Discussion:
[Middlegen-user] primary key generation for ejbCreate(${table}Data)
Brian Cochran
2002-10-14 21:32:01 UTC
Permalink
One more thing,

If you call ejbCreate with a Data Object shouldn't we override the primary
key with a generated key. Its slightly different from the other
#sequenceBlock() because you would be doing a
dataObject.setSomeGeneratedId(generatedValue) instead of just calling
setSomeGeneratedId(generatedValue) on the entity bean itself. Still this
seems like the correct behavior. Tell me what you think.

Brian
Aslak Hellesøy
2002-10-14 21:42:01 UTC
Permalink
I don't recall what the XDoclet-generated setData(data) does, but IIRC, it
doesn't try to set pk fields. -So it should be safe to do

#sequenceBlock()
#guid()
setData(data)

Could you try that and say how it works for you?

Aslak
-----Original Message-----
Cochran
Sent: 15. oktober 2002 01:32
Subject: [Middlegen-user] primary key generation for
ejbCreate(${table}Data)
One more thing,
If you call ejbCreate with a Data Object shouldn't we override the primary
key with a generated key. Its slightly different from the other
#sequenceBlock() because you would be doing a
dataObject.setSomeGeneratedId(generatedValue) instead of just calling
setSomeGeneratedId(generatedValue) on the entity bean itself. Still this
seems like the correct behavior. Tell me what you think.
Brian
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...