Jhipster: Why I can't see metamodel entity generated from jdl file? - jhipster

I'm new in Jhipster and I'm trying to generate MetaModel entities with jdl file from Jhipster. When I run command to generate entity, my Eclipse doesn't show MetaModel entities. Can anyone had the same problem? Thanks in advance to everyone.

You must either build with maven/gradle or configure Eclipse to run the annotation processor as documented in
JHipster documentation
and/or JPA Static Metamodel Generator documentation

Related

Entity for a view Jhipster

I am new in jhipster and I would like to know If I can create an entity for a view like the table with jhipster command ? And how to do it ?
I used jhipster entity command but I am not sure this is the right way to do it
JHipster does not support SQL views in Liquibase but JDL lets you flag an entity as read-only which will prevent generating code for creating or updating an entity.
You can then manually adapt generated code to replace table by view, it should be limited to Liquibase migration file.
See official JDL doc for examples: https://www.jhipster.tech/jdl/options
jhipster entity command also asks you whether new entity should be read-only.

Is there a jhipster json configuration specification

I have gone through the JHipster guides and seen how to use the JHipster definition language in JDL Studio to create entities and relationships etc, which is great.
But I am working on an application with dozens of entities already created and need to re-generate some of them after making changes to the .json files - but I don't see any specification of that .json configuration language.
I have seen suggestions to try generating a new entity (jhipster entity book) and look at the .json it outputs.
Is there no specification of what .json language at all?
There a json schema definitions for entities: https://github.com/jhipster/jhipster-base
Does that help?

Generate front-end based on database or java model

I need to migrate the front-end of an application to angular. I want to use jhipster and reuse all existing java back-end and database. My questions are:
Is it possible to generate the front-end based on java model or i need to have the JDL files?
Is it possible to generate JDL files from the java model or from the database schema?
Thank you for your help.
No
No even though there has been some attempt like https://github.com/bastienmichaux/generator-jhipster-db-helper but I don't think it will go far enough for you
Thank you for your help.
I found another approach to generate the JDL files based on the database:
https://github.com/Blackdread/sql-to-jdl
I will try it.

JHipster - entity generation - dynamic filtering for the entities

I have created a new jhipster project v4.13.3.
When creating a entity e.g.:
jhipster entity Employee
And selecting Dynamic filtering for the entities with JPA Static metamodel
An EmployeeQueryService class is subsequently created.
When looking in this class at the createSpecfication method, there are entries like this:
(buildStringSpecification(criteria.getFirstName(), Employee_.firstName));
Employee_ as far as I can tell is not defined anywhere and Intellij reports "cannot resolve symbol".
Running mvn, no errors are reported and the app runs fine.
Am I missing something?
Thanks
As documented, JPA static metamodel is generated by an annotation processor at build time. Maven knows about it, your IDE doesn't.

Use JAXB-RI with Jersey

I am using the xjc ant task provided by the JAXB-RI to generate our jaxb classes and provide all the jaxb jars in with my web application's WEB-INF/lib folder. Jersey is still using the runtime provided jaxb implementation (found in rt.jar) Is there some way to use #Provider to force it to use the jaxb-ri jars?
As far as I understood the problem correctly, this small tutorial should help.

Resources