Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2009
    Posts
    16
    Rep Power
    0

    Default One-To-many & Many-To-One - @Join columns on both sides or mapped-by:

    [P-279 of EJB3 In Action] states:
    "Note that the exact @JoinColumn vspecification could have been repeated for both the Bid.item and Item.bids persistent fields on
    either side of the relationship."

    [P-280 of EJB3 In Action] states:
    "The persistence provider will generate deployment-time errors if you specify @JoinColumn on both sides of a bidirectional one-tomany
    relationship."

    Aren;t these 2 statements contradictory?

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    In what way?

  3. #3
    Join Date
    Oct 2009
    Posts
    16
    Rep Power
    0

    Default

    Stmt1: It says you can specify this annotation on both sides
    Stmt2: It will give you deployment time errors.

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Does the book say that for the same type of relationship?
    i.e is the first part referring to bi-directional one-to-many relationship as well?

Similar Threads

  1. Replies: 5
    Last Post: 05-11-2009, 04:27 PM
  2. Memory-Mapped File-(MappedByteBuffer )
    By lenah in forum Advanced Java
    Replies: 3
    Last Post: 12-22-2008, 07:00 PM
  3. Triangle Sides program
    By jamesov89 in forum New To Java
    Replies: 6
    Last Post: 10-06-2008, 03:36 AM
  4. Bean data not mapped to database
    By kriskras in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 07-19-2008, 09:13 AM
  5. Replies: 2
    Last Post: 12-01-2007, 07:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •