Thank you,
Indeed I'm storing the FK (called numetbper) in my table Personne.
But if I don't put an @ejb-persistence tag, I have an error because when I
create a Personne the server don't find the FK...

If I let the persistence tag:
It seems there is a conflict between the attributes numetbper (the FK) and
etablissement (the CMR field) during the creation.
How can I manage this

Thanks

-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] la part de Adam
Levine
Envoy� : mercredi 23 juillet 2003 21:29
� : [EMAIL PROTECTED]
Objet : Re: [Xdoclet-user] JBoss + CMR


If you're storing the FK in your table/class, do not create/manage it with a
@ejb-persistence tag




From: "Maxime Chevalier" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "xdoclet" <[EMAIL PROTECTED]>
Subject: [Xdoclet-user] JBoss + CMR
Date: Wed, 23 Jul 2003 19:45:06 +0200

Hello,

I try to create CMR between 2 CMP under JBoss: Personne and Etablissement
I manage to deploy and a simple Read-access functions well.
My problem is with a Write Access. My DataBase returns:

 >12:25:11,808 ERROR [STDERR] javax.ejb.CreateException: Could not create
 >entity:java.sql.SQLException: ORA-00957: duplicate column name

The CMR is a 1-N relation:

in Personne:

   /**
   * @ejb.interface-method
   * @ejb.transaction
   *      type = "Required"
   *
   * @ejb.relation
   *      name = "PersonnesDansUnEtablissement"
   *      role-name = "PersonneDansUnEtablissement"
   *      target-role-name = "EtablissementADesPersonnes"
   *
   * @jboss.relation
   *      fk-column = "NUMETBPER"
   *      related-pk-field = "numetb"
   *      fk-constraint = "true"
   */

   public abstract Etablissement getEtablissement();

   /**
   * @ejb.interface-method
   */

   public abstract void setEtablissement(Etablissement etablissement);

And in Etablissement:

   public abstract java.sql.Date getDatemodetb();

    /**
    * @ejb.interface-method
    * @ejb.transaction
    *      type = "Required"
    * @ejb.relation
    *      name = "PersonnesDansUnEtablissement"
    *      role-name = "EtablissementADesPersonnes"
    *      target-role-name = "PersonneDansUnEtablissement"
    *      target-cascade-delete = "no"
    *
    */

   public abstract java.util.Collection getPersonne();

   /**
    * @ejb.interface-method
    */

   public abstract void setPersonne(java.util.Collection personne);

Does anyone have an idea of the source of the problem ?
Thanks by advance

        Maxime



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to