Oh...

I have these subtasks in build.xml

what do i need the <entitycmp/> for
i see it generates a lot of CMP classes, what are they for they extends
my Bean class and implements EntityBean, for what ?


<localinterface/>
<homeinterface />
<localhomeinterface/>
<remoteinterface/>
<entitypk/>
<deploymentdescriptor destdir="${ejb.build.dir}/META-INF"/>
<jboss version="3.0"
        datasource="java:/SapdbDS"
        typemapping="SapDB"
        destdir="${ejb.build.dir}/META-INF"
/>


On Wed, 2003-10-01 at 21:28, Edward Kenworthy wrote:
> I assume you have the <entitycmp/> sub-task in your build.xml - do you have
> the <jboss/> sub-task in there as well ?
> 
> Edward
> 
> On 1/10/03 5:49 pm, "David Nielsen" <[EMAIL PROTECTED]> wrote:
> 
> > Hi.
> > 
> > now i tried:
> > 
> > /**
> > * @ejb:interface-method
> > * @ejb:relation
> > *          name="MailMessages-toUser"
> > *          role-name="MailMessages-Has-toToUser"
> > *          target-ejb="Users"
> > *          target-role-name="toUser-belongs_to-MailMessages"
> > *          target-cascade-delete="yes"
> > * @jboss:target-relation
> > *          related-pk-field="messageKey"
> > *          fk-column="messageKey"
> > * @jboss:relation-table
> > *          table-name="MailMessages_toUsers"
> > *          create-table="true"
> > *          remove-table="true"
> > */
> > 
> > 
> > end even tried:
> > * @jboss:relation-mapping style="relation-table"
> > 
> > 
> > 
> > my
> > *          related-pk-field="messageKey" (field in Mailmessages - the
> > getMessageKey)
> > *          fk-column="messageKey" (column in the mailmessages table)
> > 
> > jboss creates the mailmessages + the users table but no
> > mailmessages_tousers table, and there now are a column (messagekey)  in
> > users table.
> > 
> > i dont get it.....
> > 
> > 
> > On Wed, 2003-10-01 at 16:19, Edward Kenworthy wrote:
> >> Hi David
> >> 
> >> Here's my working CMR code, which is very similar to yours (1-m,
> >> unidirectional).
> >> 
> >> /**
> >> * @ejb.interface-method
> >> * @ejb.relation
> >>    
> >> *          name="ProjectRequirements"
> >> *          role-name="Owning-Project"
> >> *          target-ejb="RequirementBean"
> >> *          target-role-name="Requirement"
> >> *          target-cascade-delete="yes"
> >> * @jboss.target-relation
> >> 
> >> *          related-pk-field="ID"
> >> *          fk-column="RQ_ID"
> >> * @jboss.relation-table
> >> *          table-name="T_PROJECTS_REQUIREMENTS"
> >> 
> >> *          create-table="true"
> >> *          remove-table="true"
> >> */
> >> public abstract Collection getRequirements();
> >> 
> >> The bit you seem to be missing is the @jboss.relation-table tag.
> >> 
> >> Hope this helps.
> >> 
> >> Edward
> >> 
> >> On 1/10/03 2:01 pm, "David Nielsen" <[EMAIL PROTECTED]> wrote:
> >> 
> >>> And if i Use:
> >>> 
> >>> 
> >>> /**
> >>> * @ejb.interface-method
> >>> * @ejb:relation
> >>> *   name="MailMessages-toUser"
> >>> *   role-name="MailMessages-Has-Many_toUsers"
> >>> *   target-ejb="Users"
> >>> *   target-role-name="toUser-belongs_to-MailMessages"
> >>> *   target-cascade-delete="no"
> >>> *   target-mulitple="no"
> >>> * @jboss.target-relation
> >>> *  related-pk-field="messageKey"
> >>> *  fk-column="MESSAGEKEY"
> >>> */
> >>> public abstract Collection getToUsers();
> >>> 
> >>> /** 
> >>> [EMAIL PROTECTED]:interface-method view-type="local"
> >>> */
> >>> public abstract void setToUsers(Collection toUsers);
> >>> 
> >>> jboss complains:
> >>> 
> >>> Unknown column name:USER_KEY
> >>> 
> >>> and if i go to the server.log i see:
> >>> 
> >>> INSERT INTO MAILMESSAGES (messageKey, subject, fromUser, messageType,
> >>> parentMessageKey, projectTaskKey, text, user_key) VALUES (?, ?, ?, ?, ?,
> >>> ?, ?, ?)
> >>> 
> >>> the toUsers column is not present but the user_key which chould be
> >>> toUsers in the table is there ??????????
> >>> 
> >>> 
> >>> What the he..... am i doing wrong ???
> >>> 
> >>> 
> >>> 
> >>> On Wed, 2003-10-01 at 13:42, David Nielsen wrote:
> >>>> I have a problem with my relatonship:
> >>> 
> >>> 
> >>>> 
> >>>> i have a table called MailMessages and a table called Users.
> >>>> 
> >>>> in my MailMessages i have a getToUsers which is a collection of Users
> >>>> which i send messages.
> >>>> 
> >>>> so i created:
> >>>> 
> >>>> /**
> >>>> * @ejb.interface-method
> >>>> * @ejb:relation
> >>>> *   name="MailMessages-toUser"
> >>>> *   role-name="MailMessages-Has-Many_toUsers"
> >>>> *   target-ejb="Users"
> >>>> *   target-role-name="toUser-belongs_to-MailMessages"
> >>>> *   target-cascade-delete="no"
> >>>> *   target-multiple="yes"
> >>>> * @jboss.relation
> >>>> *  fk-column = "toUsers"
> >>>> *  related-pk-field = "user_key"
> >>>> *  fk-constraint = "true"
> >>>> */
> >>>> public abstract Collection getToUsers();
> >>>> /**
> >>>> [EMAIL PROTECTED]:interface-method view-type="local"
> >>>> */
> >>>> public abstract void setToUsers(Collection toUsers);
> >>>> 
> >>>> 
> >>>> but jboos keep saying:
> >>>> 
> >>>> Both roles of a relation-table mapped relationship must have key fields:
> >>>> ejb-relation-name=MailMessages-toUser
> >>>> 
> >>>> dont thay have that ? whats giong wrong
> >>>> 
> >>>> i have a 1-1 relation working, the ony diference i made is that i use a
> >>>> Collection instead of UsersLocal interface
> >>>> 
> >>>> Regard David Nielsen
> >>>> 
> >>>> 
> >>>> 
> >>>> -------------------------------------------------------
> >>>> This sf.net email is sponsored by:ThinkGeek
> >>>> Welcome to geek heaven.
> >>>> http://thinkgeek.com/sf
> >>>> _______________________________________________
> >>>> xdoclet-user mailing list
> >>>> [EMAIL PROTECTED]
> >>>> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >>>> 
> >>> 
> >>> 
> >>> 
> >>> -------------------------------------------------------
> >>> This sf.net email is sponsored by:ThinkGeek
> >>> Welcome to geek heaven.
> >>> http://thinkgeek.com/sf
> >>> _______________________________________________
> >>> xdoclet-user mailing list
> >>> [EMAIL PROTECTED]
> >>> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >> 
> >> 
> >> 
> >> -------------------------------------------------------
> >> This sf.net email is sponsored by:ThinkGeek
> >> Welcome to geek heaven.
> >> http://thinkgeek.com/sf
> >> _______________________________________________
> >> xdoclet-user mailing list
> >> [EMAIL PROTECTED]
> >> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >> 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to