Re: CMR/CMP Problem

Eivind Waaler <[email protected]>
Newsgroups gmane.comp.java.ejb.middlegen.user
Message-ID <[email protected]>
On Tue, 17 Aug 2004, Leslie Hughes wrote:

>
> Hi,
>
> I'm getting a CMR/CMP problem when I try to call create with a VO instance.
>
> In the Middlegen generated ejbCreate method (which takes a VO as a param)
> the generated code is calling a setter on a CMP field that holds the FK.In
> other words, instead of setting the relationship in the ejbPostCreate via a
> Local to the other bean, it's trying to set the (integer) FK directly with
> something like setFoo(vo.getFoo()).  This causes Weblogic to complain at
> runtime.
>
> If I set FKCMP="false" then I get compilation errors - the same copy from VO
> create code is generated and setters are being called but of course, the
> setter itself isnt generated.
>
> If I comment out the setters everything works just fine.
>
> So I guess this is a bug in Middlegen - it shouldn't be generating VO fields
> for CMR fields maybe?
>

Yes that sounds like a bug with Middlegen. It's been a long time since I
looked at the VO stuff, but I'll try to get it fixed in the next release
(hopefully quite soon). As always, if people submit patches or sample code
it's faster for me to implement :)

Cheers
.eivind

>
> Bye
>
> Les
>
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> middlegen-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
>
>


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.