Re: Sequence and dataobjects error
Eivind Waaler <[email protected]>
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
I would recommend getting Middlegen from CVS, get the VALUEOBJECT_REFACTORING_BRANCH. That way you can use value object instead of dataobject, those should work better.. .eivind On Fri, 3 Oct 2003 [email protected] wrote: > Hi all, > > I've generated some entity EJBs with middlegen software. I've set "dataobject=true" and included the "sequenceblock" in the "cmp20" task. > > The problem appears when I try to make a create over the entity EJB with the generated dataobject. Because the setData function neither uses the Sequence EJB to get the following ID for the EJB, nor reads the ID from the dataobject, an SQL exception rises: > Fail to add null value in not null attribute ID > because the ID is null (and it's the primary key). > > There's no problem if I create the entity passing the parameters instead of passing the dataobject. > > Is there any solution?. Do I have to include the PK generation in every create method if I want to create with the dataobject? > > Thanks, > Jorge > > __________________________________________________________________ > McAfee VirusScan Online from the Netscape Network. > Comprehensive protection for your entire computer. Get your free trial today! > http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 > > Get AOL Instant Messenger 5.1 free of charge. Download Now! > http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > middlegen-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/middlegen-user > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf