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

Reply via email to