> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Kristoffer Moe
> Sent: 2. oktober 2002 16:17
> To: [EMAIL PROTECTED]
> Subject: [Middlegen-user] Double PK field trouble with EJB CMP2.0
> composite PK in CMR/CMP clash
>
>
> This problem may or may not have anything to do with middlegen, but is in
> any case as follows:
>
> Three tables A, B, C have bi-directional 1:n relationship between A and B,
> ditto between B and C. Tables A and C have single attribute PKs, but B has
> compound PK, composed of foreign keys to A and C tables' PK's. In effect,
> this is a m:n relationship between A and C, with som additional
> information
> (ie a description) attached to table B.
>
So it's *exactly* like the airline sample, then. Did you look at that?
> Result is that entity bean for B gets FK/PK fields acting both as CMR and
> CMP fields. Rules are approx. as follows: 1) a CMR field is read-only in
> ejbCreate(...), but may be set in ejbPostCreate(...), which is what
> middlegen-generated code does 2) PK fields must be set by ejbCreate(...),
> otherwise weblogic refuses to create bean. Since the setXXX
> methods in this
> case are the same for PK fields and CMR fields, an attempt to call CMP
> setXX in ejbCreate is denied, since it is assumed to be a CMR
> set, which is
> not allowed. Also, since the table has no id attribute by itself which can
> be auto-counted or whatever, there is only possible to create an instance
> by supplying already extisting A and B beans. In other words, it is not
> possible to first create a B and then attach an A and C afterwards.
>
> Any ideas?
>
Create A and C first and then create B ;-)
-or ask on http://newsgroups.bea.com/
>
> Regards,
>
>
> Kristoffer Moe
> Senior Consultant
> Elan It ReSource
>
>
>
>
>
> -------------------------------------------------------
> 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
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user