Reputation: 590
I have an existing view in a relational database and I'd like to add it as an existing entity in the model with jhipster using jdl-import. How can I mark the entity as readOnly using jdl-import generator?
Upvotes: 1
Views: 1543
Reputation: 6322
Starting from JHipster 6.4.0, it is possible to define an Entity as readonly in JDL.
When defining you Entity in JDL, you can define it as readonly by using an annotation:
@readOnly
entity MyEnity {
}
Or by using an option:
entity MyEntity {
}
readOnly MyEntity
The release notes of 6.4.0 can be found here.
The JDL documentation also includes a section explaining hoy the readOnly
annotation/option can be used: https://www.jhipster.tech/jdl/options
Hope it helps,
Upvotes: 4
Reputation: 16294
You can't do it in JDL nor in entity sub generator, you must do it manually in code after generation.
Upvotes: 1