michael_paul 发表于 2013-1-28 09:43:34

Hibernate composite key use sequence(auto increment) id

Hibernate doc:
You cannot use an IdentifierGenerator to generate composite keys. Instead the application must assign its own identifiers.

Your best source of information is the Hibernate documentation. See this section on composite-id and Components as Composite Identifiers. Unfortunately, you cannot use an IdentifierGenerator with composite ids so your application will need to explicitly assign the ids. Note that is is strongly recommended that you avoid composite ids whenever possible...


https://forum.hibernate.org/viewtopic.php?p=2374438

http://momodog.iteye.com/blog/295220
页: [1]
查看完整版本: Hibernate composite key use sequence(auto increment) id