Closed sergiofm closed 7 years ago
Indeed! Thanks for pointing this out. I have implemented it in Celerio 4.0.20. Could you please test it and let me know how it goes.
Wow, that was fast! I've tryied and it worked! But, we have some special requirement here. Let me explain. We have one catalog, with more than one schema on it. The tables from one schema have relationship with tables from another schema, so we need to generate the code for the entire catalog at once. To do that, I used % as the schema in the pom.xml configuration, and the code was well generated, unless for one thing, the anotation was generated with % in the schema attribute. I believe that attribute came from the pom.xml configuration, right? Is it possible to get that attribute from table metadata instead of the configuration? Our project is really big, and change all the entities by hand will be very expensive. Again, thank you very mutch for your effort. This project is amazing!
OK, I see. In your case, can 2 tables living in 2 different schemas may have the same name ?
In our case not. But I think that separate entities for each schema can be a good idea. Maybe a subpackage per schema. Like models.schema.Entity
I have reworked this issue. Please read the change log for release 4.0.21. Make sure to run the db reverse with 4.0.21 in order to fetch the schema/catalog from jdbc table metadata.
Let me know how it goes! I am also curious to know more about your schemas (how many tables in total?). Cheers
We're migrating a big system for a new archtecture witch is identical as the angular-quickstart generates, for our luck! :) Today we have more than 60 tables, separeted in 3 schemas, but the project is in early stages, and it still will grow to around 80 tables. I've tested the change, and it works well! And I did liked the configurations options. Is really better this way. Our team decided to make a fork of your project and soon we will make some contributions too. Thank you very mutch for your effort. This project is really nice and we're glad to help improve it!
Great, thanks for your feedbacks, I am glad it is useful.
Hi there.
I'm using Celerio to generate code from a SqlServer Database and I need to generate the entitys with the @Table annotation like this @Table(catalog = "Catalog", schema = "Schema", name = "Table"). I've looked the code and this annotation seems to be generated with only the name attribute, so I'm trying to modify my template, but I didn't find a way to get the Schema and the Catalog for a entity. Can you help me with that? Thanks