beta4 does not have the need for you to specify the reverse engineerings strategy.
if you want to change the generator strategy for *all* table/classes then the simplest thing is to implement a custom strategy that return "increment" in the getTableIdentifierStrategyName.
Your last question is a bit ambigious ? Are you asking how to generate code from existing mapping files ? Simply *don't* select to reverse engineer then it will take the current mappings and use for its code generation.
Thanks for your prompt reply.
I have changed the generators type in the mapping files by hand, then run the code generation again, but with "reverse engineering from JDBC connection" unchecked. I thought this as what you meant.
I get an error saying that it does find the xx.hbm.xml files, and they are there.
Also, the package name does not look to be taken into account when producing the Java files.
I expect the id to be removed from the full and minimal constructors.
I can remove them by hand as well.
are the mapping file available through the classpath of the console configuration ?
Brilliant, this is it. I confirm that the id are not in the constructors anymore if the generator is set to 'increment'.
I also confirm that the package does not work for me. The JBoss Hibernate tool creates the java files in the default package, and if I move them to another package then I get an error from Hibernate at run time for classes created for composite keys, saying he does not find the hbm file for them. Of course they are no such files.
I will t
...and your revengstrategy is set to blank ?
...and if you have a custom revengstrategy it implements DelegateReverseEngineringStrategy so it does not "swallow" the table to package/classname calls ?
>> ...and your revengstrategy is set to blank ?
To do this, I have to check the reverse engineering checkbox, and I get an ClassNotFoundException (mentioned in the link given in my first message).
So I read that I need to use this value org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy, but the package is not generated.
>> ...and if you have a custom revengstrategy it implements DelegateReverseEngineringStrategy so it does not "swallow" the table to package/classname calls ?
I don't know how to do that. Probably I would need to dip into your source code for a few days before being efficient. Is this what you mean ?
you need to upgrade to beta4 which does not require this reveng strategy.
(and the part of how to write a revengstrategy is documented in the docs)
It's all ok with beta 4. The package is generated properly, the mapping file is correct regarding the package and it runs smoothly.
I will re-generate the Java files after changing manually the generator in the mapping files, this is absolutely fine.
Thanks very much for your support, especially that the code is right, I did not figure out that this functionality was so much on the edge and beta 3 was contained in the bundle.
I think I will become a big fan of JBoss, and look forward to using the Seam product in a few months.