This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Address-has-one-Customer with multiplicity many using foreign-key mapping

 
sree krishna kanth bandi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

I defined one-many relation ship in EJB 2.0.

Parent relation look like this.

/**
* @ejb.interface-method
*
* @ejb.relation name = "Customer-to-Address"
* role-name = "Customer-has-many-Addresses"
* target-ejb = "AddressBean"
* target-role-name = "Address-has-one-Customer"
*
* @jboss.relation fk-column = "customerID"
* related-pk-field = "addressID"
*
* @return
*/

public abstract Collection getAddresses();
/**
* @ejb.interface-method
*/
public abstract void setAddresses (Collection addresses);


child relation look like this


/**
* @ejb.interface-method
*
* @ejb.relation name = "Customer-to-Address"
* role-name = "Address-has-one-Customer"
* target-ejb = "CustomerBean"
* target-role-name = "Customer-has-many-Addresses"
* target-multiple = "true"
* @jboss.relation fk-column = "addressID"
* related-pk-field = "customerID"
*
* @return
*/

public abstract CustomerLocal getCustomer();

/**
* @ejb.interface-method
*/
public abstract void setCustomer( CustomerLocal customer );



But when i deploy this jar file I got fallowing error

I am using jBoss 4.0.2.

"Address-has-one-Customer with multiplicity many using foreign-key mapping is not allowed to have key-fields "

thanking you in advance

best regards

krishna kanth

Did any one of you aware of this problem.
 
Space pants. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!