Hi all, I saw that exist more then one way to map a Composite Key with JPA.
But in my case is kind of different:
I have a table with only 2 column:
mysql> desc mytable; +--------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+-------------+------+-----+---------+-------+ | name | varchar(80) | NO | PRI | | | | tag | varchar(80) | NO | PRI | | | +--------+-------------+------+-----+---------+-------+
My point is: Do I need to create a new (primary key class) class just to map my composite key?
I'm trying to find the easiest way to do it.
Some one can help-me?
Thanks in advance!
I'm trying with this approach: http://www.java.net/print/236710