Why my JDL fixture didnt work – case stude


It’s time to generate MVP application in one line! To generate it from input.jh file we can use command:

And after project was generated I tried to run it using gradlew bootRun command. The first problem was an event:

We had created event in three places: for relations with City, Series and Topics entities. This caused our problem, that variable event was already defined 🙂 We need modify a little bit out JDL to make it work correctly. Let’s try with refactoring of relationships:

We need to import jdl file, remove and create database, next rebuild the project.

Jee, it’s almost working! Data are being added in correct way, but still there is some problem with selectbox from relationship. Automatically JHipster displays only record ID. You can modify it in generated json file, searching for parameter:

We need to change otherEntityField to be rather like:

and regenerate just two modified entities: Topics and Event. You can regenerate all entities or choosen one, depending on what you need. Looks cool! To do this please use commands from below.

It looks like below and you can replace existing files and rebuild the project 🙂

 

 

 

Application is working as simply as design 😉 You can run it with code from repo available here. In next episodes we will try to improve the implementation to look better.

Rating: 5.0. From 1 vote.
Please wait...
Paweł Dobrzański

Start-up's fan, technological conferences member, social media enthusiast and low-cost trips traveler.

You may also like

Bądź na bieżąco na FB!

Cześć!

Witaj na moim blogu! Znajdziesz tu proces budowania mojej aplikacji EventSearch za pomocą jhipstera. Podzielę się z Tobą niuansami dot. zakładania i prowadzenia firmy. Mam również nadzieję, że pomogę Ci zaoszczędzić trochę pieniędzy. Zapraszam!

Sociale

Promocja na helionie!

BDD w działaniu. Sterowanie zachowaniem w rozwoju aplikacji

autor: John Ferguson Smart

Cena: 61.60 zł
(Cena druku: 77.00 zł)

Najpopularniejsze posty

Dzięki, że wpadłeś!

Paweł Dobrzański

Paweł Dobrzański

Start-up's fan, technological conferences member, social media enthusiast and low-cost trips traveler.