//Sorry for bad Engilsh
我有一些类似的EmbeddedId:
@Embeddable
data class Id(
@ManyToOne
val firstPartOfPK: SomeClass = SomeClass(),
val number: Int = 1
) : Serializable
我应该使用什么映射来自动生成来自Hibernate的密钥,如:
firstPartOfPK1, 1
firstPartOfPK1, 2
firstPartOfPK1, 3
firstPartOfPK1, 4
firstPartOfPK2, 1
firstPartOfPK2, 2
firstPartOfPK2, 3
firstPartOfPK3, 1
firstPartOfPK3, 2
...
每个firstPartOfPK_N都有新的数字,具有1的自动增量能力