[jboss-user] [EJB 3.0] - Re: How to access a join table column?!

fabiorusso do-not-reply at jboss.com
Tue Jul 25 07:26:44 EDT 2006


Ok! Now it's clear! So I do m:jointable and jointable:m
That's it then. So I can of course also map the OptionRates in the PartnerToRate with: 

  | @ManyToOne
  |    Partner getOptionRate()
  |    {
  |       return optionrate;
  |    }
  | 
 and in the OptionRate entity with:

  | @OneToMany( mappedBy="optionrate")
  | List<PartnerToRate> getPartnerToRates()
  | {
  |    return partnerToRates;
  | }	
  | 

So from now on I know I can use the Many2Many only if I don't need to access any column in the join table and have to use the Many2One with a join entity in the middle otherwise. 

I will try this immediately. :-)

Thank you very much!! Your code was very helpful.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960642#3960642

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960642



More information about the jboss-user mailing list