Asking about create data model

Hi, I want to ask about creating data model by using only java coding (e.g. create by some action in web ui).
I understand while create new data model in studio, it will at new class tag at persistence.xml but I’m not sure that is cuba change another files or some setting.
And by any chance that I could create new model without using studio or edit (new/delete) properties of entity on the fly?.

I’m not sure what you mean by “action in web UI”. It looks like you would like to create create data models without the Studio.

I tried an approach to generate Cuba entities and screens from DDLs:
https://postgresapps.com/cuba

Not exactly what you are looking for but a confirmation that many things are possible with CUBA :slight_smile:

Thanks you for reply, “action in web ui” state i mean create data model by recieved parameters and setting using custom ui that i’ve created, it’s like using entity designer in cuba but on the website instead.
Anyway, Thanks you for sharing the idea of postgreas.

1 Like

Hi,

Cuba has this quite advanced feature of dynamic attributes. This allows to dynamically add properties while at runtime. It is also integrated throughout the platform like filters, forms, rest api etc.

But what is not possible is to create entities on the fly out of the box. It seems it is somehow possible with spring, but I’m not sure on what has to be done on CUBA. See more info here: https://stackoverflow.com/questions/2838634/programmatically-loading-entity-classes-with-jpa-2-0

Cheers
Mario

Alternatively it is also possible to bypass the JPA layer completely. With that you’ll have an easier time creating very dynamic structures via the UI, but for those tables you would have to implement all of the data access logic from Cuba on your own (lie security, filtering etc.)

Bye
Mario