OK, i just realized that the <auto-increment /> elements is in fact NOT
necessary to be present when wanting to make use of the identity increment
on the PK-field of a table.

In fact only the following is necessary in the <defaults> section of the
jbosscmp-jdbc.xml:

<entity-command name="mssql-fetch-key" />

and the IDENTITY_INSERT property will be toggled (ON and OFF) when the MS
SQLSERVER 2000 DB is used for e.g.

No need to answer my previous question, thanks again.

Gerrit.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Gerrit
> Grobbelaar
> Sent: Wednesday, March 09, 2005 13:44
> To: middlegen-user@lists.sourceforge.net
> Subject: [Middlegen-user] Auto-increment primary key field
>
>
> Hi,
>
> I finally got my tables to auto-increment the pk-field values with the MS
> SQLSERVER 2000 when _ejbCreate_ is called.
>
> Now, obviously the only way to get the <auto-increment />
> elements generated
> for the beans in the jbosscmp-jdbc.xml file is to have in the
> middlegen-generated beans the following xdoclet code:
>
>     * @jboss.persistence auto-increment="true"
>
> I have no idea how to accomplish this, I just got everything working by
> hardcoded it in the generated beans after running my middlegen
> build-system.
> This is the final hurdle to completely do away with the
> JBossUtilAutoNumber-generator, and seamlessly with the
> middlegen-code-generation.
>
> Any advice here would be highly appreciated to accomplish this goal, I'll
> keep at it in the meantime.
>
> Thank you in advance,
> Gerrit
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> middlegen-user mailing list
> middlegen-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
middlegen-user mailing list
middlegen-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to