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

Reply via email to