• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Maybe he went home and went to bed. And took this tiny ad with him:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic