I'm using Sybase too, but for my auto-increment fields I use triggers 
rather than identity fields (because of the enormous gaps you get in the 
numbering with identity fields when the Sybase server is restarted).

These triggers are activated by passing a zero in for the auto-increment 
field value, which makes creating a new record simple.

I then use the ejbPostCreate to fetch the value assigned to the 
auto-increment field from the database, and update both the EJB (and its PK 
if applicable) with that.

BTW questions such as this are not relevant to 
[EMAIL PROTECTED] which is a server-development list.

Joe

-----Original Message-----
From:   Ritesh [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, December 08, 2000 10:41 AM
To:     [EMAIL PROTECTED]
Cc:     [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject:        Problem In CMB with Auto Incement fields

hi ,

    I am using Jonas2.1.2.
    Sybase as  back end .
    I am using CMP beans .
    For only primary keys its working Fine.

    The Problem now i am facing problem is ,
     in my tables the field is auto increment (Identity)  and some fields 
are FK

    In jonas how i can insert data into the database by using my CMP. ?
    How Jonas handle FK types fields. ?


-Ritesh.

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to