0
我想在自定义类中包装id。像这样id密钥的自定义包装
@Entity
@Table(name = "USERS")
public class User {
@EmbeddedId
UserId id;
}
@Embeddable
public class UserId implements Serializable {
private Long value;
}
的汽车代value
为UserId
问题。我应该怎么做@GeneratedValue
value
可行?
顺便说一句,如果id
会自动初始化,那将会很棒。
感谢您的回复。这是非常奇怪的,这种功能不支持,因为它可以被普遍使用。 –