You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Ankur Goyal <as...@umail.iu.edu> on 2012/01/03 23:33:03 UTC

A person property has a relationship defined in the opposite way

Hi,

Just wondering if the person property "addresses" has the join table
defined in the opposite way

@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL,
orphanRemoval = true)
    @JoinTable(name = "person_address_jn",
            *joinColumns = @JoinColumn(name = "address_id",
referencedColumnName = "entity_id"),*
*            inverseJoinColumns = @JoinColumn(name="person_id",
referencedColumnName = "entity_id"))*
    protected List<Address> addresses;

Shouldn't it be like the other way round ? :-
joinColumns = @JoinColumn(name = "*person_id*", referencedColumnName =
"entity_id"),
inverseJoinColumns = @JoinColumn(name="*address_id*", referencedColumnName
= "entity_id"))

Waiting for replies

Regards
Ankur