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

你可能感兴趣的:(Hibernate,PHP,Blog)