8 Replies Latest reply on Jan 16, 2006 10:49 AM by cyril.joui

    mapping unidirectional relation with parameterised compound

    andy.2003

      Hello,

      I need some help for map the follwing relations with ejb3:

      |-------------------| |--------------------|
      |Product | |Description | |-------------------|
      |-------------------| |--------------------| |Languages |
      |product_id:int (PK)|----->|product_id:int (PK) | |-------------------|
      |... | |language_id:int (PK)|<----|languga_id:int (PK)|
      |-------------------| |... | |... |
       |--------------------| |-------------------|
      


      I need a method for getting the Productdescription for a specified language
      like
      public Description getProductDescription(int pLangugeId)
      


      For me the problem is to set up such a method. I get an error when I try to set up a relation with a parameter (the languges_id isn't stored in the Product Class and it's an unidirectional relation!).

      Can anybody give me a hint how to solve this problem?!

      Thanks Andreas