Hibernate version: 3.0
Name and version of the database you are using: PostGreSQL v8.0.1
Right now, the "Hibernate Artifact Generation" eclipse plug-in produces:
Code:
<id name="id" type="integer">
<column name="id" />
<generator class="assigned" />
</id>
for primary key fields in my PostgreSQL tables.
I'd like it to produce:
Code:
<id name="id" type="integer" column="id">
<generator class="sequence">
<param name="sequence">[name of table here]_id_seq</param>
</generator>
</id>
Using the latter xml in my mapping files yields exactly the behavior I'm looking for on the part of Hibernate. I'd like to skip all of the hand-editing I need to do every time I change/add a table, if I can.
The doco (
http://www.hibernate.org/hib_docs/tools/ant/index.html#gen13 ) I've read talks about implementing ReverseEngineeringStrategy and creating my own way of handling this particular situation. I don't have that interface in my distro but I'm sure I can get it out of CVS.
Is the reverse-engineering extensibility only available via ANT or will it work with the eclipse plug-in, too? If so, what changes are needed within the cfg files to allow Hibernate to find my ReverseEngineeringStrategy implementor (or DelegatingReverseEngineeringStrategy) class?