This content has been marked as final.
Show 3 replies
-
1. Re: I really need a help on the issue, please.
heinrich Mar 9, 2006 3:20 AM (in response to gus888)"gus888" wrote:
Hi all,person_id int;
[....]
@ManyToOne
@JoinColumn(name="PERSON_ID")
public Person getMember() {return member;}
public void setMember(Person member) {this.member = member;}
What kind of database do you use?
The mapping of the column might should be case sensitive. -
2. Re: I really need a help on the issue, please.
phon Mar 9, 2006 3:23 AM (in response to gus888)i think you could also try to rewrite the query so it uses the beans itself rather than their ids, which would look something like this:
public List<PartyMember> getPartys(Person person) { List resultList = em.createQuery("select p from PartyMember p " + "where p.member = :person") .setParameter ("person", person) .getResultList(); return resultList; }
i'm not sure though -
3. Re: I really need a help on the issue, please.
gus888 Mar 9, 2006 9:47 AM (in response to gus888)Thank you very much for the responses. I am using MySQL database. In fact, I always use upper case for column name when creating tables in database.
I am wondering whether the two classes' (entity and embeddable) structures are correct. Did anybody ever experience this situation (the join table)? I do not know why the system tried to use "column 'partymembe0_.personId'", should I define column name in embeddable class? Thank you for any help in advance.
Thank you Phon, I will try your sql.
GUS