[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-957?page=co...
]
Martin Serrano commented on HBX-957:
------------------------------------
Oops, my bad. This is really a documentation bug. I'll close this. The code is
correct. The example should change:
<generator class="sequence">
<param name="table">seq_table</param>
</generator>
should be
<generator class="sequence">
<param name="sequence">seq_table</param>
</generator>
generated @SequenceGenerator annotation does not support
customization of sequence table name
---------------------------------------------------------------------------------------------
Key: HBX-957
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-957
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java
Affects Versions: 3.2beta9
Environment: 3.2.2ga
Reporter: Martin Serrano
Priority: Minor
The tools documentation has an example (reproduced below) which implies that you should
be able to specify the table used for id generation via sequences. The "table"
property is never used in the creation of the @SequenceGenerator annotation. You get
@SequenceGenerator(name="generator") instead of the expected
@SequenceGenerator(name="seq_table"). I'll be submitting a patch soon.
<!-- table allows you to override/define how reverse engineering
are done for a specific table -->
<table name="ORDERS">
<primary-key>
<!-- setting up a specific id generator for a table -->
<generator class="sequence">
<param name="table">seq_table</param>
</generator>
<column name="CUSTID"/>
</primary-key>
<column name="NAME" property="orderName" type="string"
/>
<!-- control many-to-one and set names for a specific named foreign key constraint
-->
<foreign-key constraint-name="ORDER_CUST">
<many-to-one property="customer"/>
<set property="orders"/>
</foreign-key>
</table>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira