geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject CMR Setters & ejbCreate
Date Fri, 14 Oct 2005 17:05:41 GMT
So I've noticed that if I call a setter related to a CMR in ejbCreate,
it blows up:

Caused by: java.lang.IllegalStateException: Identity not available
        at org.tranql.cache.CacheRow.getId(CacheRow.java:163)
        at org.tranql.ejb.OneToManyCMR.set(OneToManyCMR.java:49)
...

The rest is slightly different depending on whether it's a CMR setter
or a CMP setter that happens to be for the foreign key of the CMR.

Anyway, calling the same thing in ejbPostCreate works fine.

(My scenario is, I have tables like Parent(ID) and child(ID, PARENT_ID
not null) so I have to set the parent_id on the child during the
creation process.)

Does the spec say something about not setting CMR fields in ejbCreate
and so I'm trying to do something wrong?  Or should we support that?

Thanks,
    Aaron

Mime
View raw message