This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!