Hi Deneb,

<vendor>

This all depends on whats your container. A portable solution to key
generation using an entity bean to mimic a Oracle sequence was posted just
last month by Jonathan Weedon on this mailing list and our public newsgroup
for Inprise Application Server (www.inprise.com/appserver). To use an Oracle
sequence in a bmp entity bean is relatively easy. To get your container
persistence manager to handle oracle sequences or identities is another
story???. Currently IAS 4.1 supports

1. Primary key generation implemented by bean provider/deployer. Here the
user provides a class implementing the interface:
com.inprise.ejb.cmp.PrimaryKeyGenerator
2. Primary key generation implemented by CMP engine. To support primary key
generation using database specific features, we provide three Entity
properties:

getPrimaryKeyBeforeInsertSql
getPrimaryKeyAfterInsertSql
ignoreColumnsOnInsert

The first property would typically be used in conjunction with Oracle
Sequences, the second and third would both be needed to support SQL Server's
Identity columns.  Although these Oracle and SQL Server features are used in
the current examples, these CMP capabilities are general enough that it
should be straightforward to support key generation techniques provided by
other DBMSs.

</vendor>

What is the level of support in this area with other products?

William Louth
Inprise
www.inprise.com/appserver

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Deneb Shah
Sent: Saturday, September 16, 2000 6:18 AM
To: [EMAIL PROTECTED]
Subject: Primary Key Please Help


Hi

Could anyone please guide me as to how do i write an entity bean where the
primary key is generated by some oracle sequence or the primary key is
autonumbered ???

Does anyone have any code or could you please give me some links.

Also i would like to know about entity bean which is consisting of 2
different tables.

Thnx
:)

Contribute to a United India
Get your free email account at http://www.sawaal.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  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 "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to