• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How mapping -> Composite Id??

 
Bruno Ambrozio
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have this table and i need to map this. this fields will be composite keys and i would like that anyone help me to configure my hibernate mapping...

+-------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+----------------+
| bairro | int(11) | | PRI | NULL | |
| logradouro | int(20) | | PRI | NULL | |
+-------------+-------------+------+-----+---------+----------------+

I have tried but, i didn�t get it.

I wait that anyone help me!!!

Thank u!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mapping composite IDs can be a little fiddly Bruno Ambrozio. The example in the Hibernate documentation is as much direstion as anyone can really give you. If you are sure you've carefully tried this, why don't you post you mapping (and possibly the error Hibernate is returning) etc. and we'll see if anyone can spot what's wrong?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic