This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How mapping -> Composite Id??  RSS feed

 
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
Boost this thread!