Yes, I have seen this before. The way I fixed it was by modifying the cmp20
template. The one out of the box is not generating the correct code in all
cases, unfortunately. But then again, is there a one-size fits all solution
ever?

Wouter

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Darren
Hartford
Sent: 12 July 2005 15:16
To: middlegen-user@lists.sourceforge.net
Subject: [Middlegen-user] [CMP20] mapping table relations


Hey all,
Trying to dive into CMR again (it's really fun you know!).

In my build script, setup table mapping like this:

<table name="MAINTABLE">
                        <crossref fktable="SUBTABLE" 
                                pkcolumn="MYPK" 
                                fkcolumn="MYPK" />
                </table>
<table name="SUBTABLE"/>


The CMP2.0 generated code looks like this:

   public void ejbPostCreate( Integer mypk, String myfield) throws
javax.ejb.CreateException {
      // Set CMR fields
      setSubtables(Subtables);
   }

As you can see from the generated code, there is no variable called
'Subtables' that is passed to the ejbPostCreate method causing
compile-time errors.  Has anyone seen this and know how to correct it?


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
middlegen-user mailing list
middlegen-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
middlegen-user mailing list
middlegen-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to