on 01-05-2006 12:15 PM
Hi group,
I have CMP-EJBs with autatically generated primary-keys.
I would like read this key - but unfortunatly there is no business-method to retrieve it (well - thats not surprising, the key is not considered as an CMP-field..)
Do you know, how to retrieve the key?
(I like to store it in my WebDynpro JavaBean to make later handling a bit easier...)
Thanks,
Simon
This won't exactly solve your problem, but it's an alternative solution.
What you can do is generate your own keys instead of letting the DB do it for you. Declare your primary key in your CMP-EJB and then use a UUID key generator to generate keys and set them on creation of the EJB.
This will provide you with a method for retrieving the key.
kind regards,
Dion
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
I found a link about writing a primary key class for CMP-EJP.
http://www.devx.com/tips/Tip/17816
EJB-1.0 vs EJB-1.1
http://www.unix.org.ua/orelly/java-ent/ebeans/appd_01.htm
Hope it helps.
Regards,
Maheswaran.B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.