@TableGenerator pkColumn and allocation [message #486023] |
Tue, 15 September 2009 23:01 |
Eclipse User |
|
|
|
Originally posted by: timoba.vsp.com
I am trying to use this annotation for primary key generation:
<xsd:attribute name="identityKey" type="xsd:integer">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">
@TableGenerator(name = "PRQuoteCriteriaGen",
table="CSA4530T",
pkColumnName="SEQ_NAME",
valueColumnName="SEQ_NEXT_HI_VAL",
pkColumnValue="SEQ_RNQ4303T_01",
allocationSize=20)
@Id
@GeneratedValue(strategy=TABLE, generator="PRQuoteCriteriaGen")
@Column(name="QUOTE_SK", unique="true")
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
here is the generated mapping:
<id name="identityKey" type="java.math.BigInteger">
<column not-null="false" unique="true" name="quote_sk"/>
<generator class="hilo">
<param name="table">CSA4530T</param>
<param name="column">SEQ_NEXT_HI_VAL</param>
<param name="max_lo">0</param>
</generator>
</id>
What am I missing to get the pkColumn* and allocationSize to show in the
mapping? I am using Teneo 1.0.1 v200809150739, EMF
2.4.0.v200808251517, and eclipse 3.4.2.R342. Thanks.
|
|
|
Re: @TableGenerator pkColumn and allocation [message #486031 is a reply to message #486023] |
Wed, 16 September 2009 01:39 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Tim,
The only answer I can give is that pkColumn* are not being picked up by Teneo. I now see that they are used for the
MultipleHiLoPerTableGenerator:
https://www.hibernate.org/hib_docs/v3/api/org/hibernate/id/M ultipleHiLoPerTableGenerator.html
If you want support for the MultipleHiLoPerTableGenerator added then please enter a bugzilla.
Can you upgrade to 1.1.1? I prefer to add new features there...
Or if totally impossible can you upgrade to 1.0.4?
gr. Martin
Tim Barthel wrote:
> I am trying to use this annotation for primary key generation:
>
> <xsd:attribute name="identityKey" type="xsd:integer">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">
> @TableGenerator(name = "PRQuoteCriteriaGen",
> table="CSA4530T",
> pkColumnName="SEQ_NAME",
> valueColumnName="SEQ_NEXT_HI_VAL",
> pkColumnValue="SEQ_RNQ4303T_01",
>
> allocationSize=20)
> @Id
> @GeneratedValue(strategy=TABLE,
> generator="PRQuoteCriteriaGen")
> @Column(name="QUOTE_SK", unique="true")
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:attribute>
>
> here is the generated mapping:
>
> <id name="identityKey" type="java.math.BigInteger">
> <column not-null="false" unique="true" name="quote_sk"/>
> <generator class="hilo">
> <param name="table">CSA4530T</param>
> <param name="column">SEQ_NEXT_HI_VAL</param>
> <param name="max_lo">0</param>
> </generator>
> </id>
>
> What am I missing to get the pkColumn* and allocationSize to show in the
> mapping? I am using Teneo 1.0.1 v200809150739, EMF 2.4.0.v200808251517,
> and eclipse 3.4.2.R342. Thanks.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03585 seconds