JPA:@OrderColumn和实体的可见状态? [英] JPA: @OrderColumn and visible state of an entity?
问题描述
这是后续问题:
是JPA支持的@ManyToMany(mappedBy = ...)+ @OrderColumn?
我指的是 @OrderColumn
Java文档:
http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html
文本与JPA 2规范在 11.1.39 OrderColumn Annotation 中写入的内容相同。
订单栏作为实体状态的一部分不可见部分的含义是什么意思准确地?这里有很多解释的余地。
这是否意味着订单栏不能是定义的任何FK和/或PK的一部分?或者只有不在FK(PK允许)?一个实体的状态包含什么? AFAIK JPA规范没有定义这个。
谢谢 解决方案
订单栏不是实体类(es)中的字段,因此它不可见(如此)。
This is a followup question to:
Is @ManyToMany(mappedBy = ... ) + @OrderColumn supported by the JPA?
I'm referring to the @OrderColumn
Java docs:
http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html
The text there is the same as what the JPA 2 spec writes in section 11.1.39 OrderColumn Annotation.
What does the part "the order column is not visible as part of the state of the entity" mean exactly? There's a lot of room for interpretation on that.
Does that mean the order column must not be part of any FKs and/or PKs defined? Or only not in FKs (PK allowed)? What does the state of an entity comprise? AFAIK the JPA spec doesn't define that.
Thanks
The order column is not a field in the Entity class(es), so it isn't visible (as such).
这篇关于JPA:@OrderColumn和实体的可见状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!