• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
I guess everyone has an angle. Fine, what do you want? Just know that you cannot have this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic