我有以下问题:我想对 DomainObject 的列进行排序,以便首先获得最重要的信息,即离开。因此,我使用了@MemberOrder
Annotaion,但这不起作用。我没有 layout.xml
,所以没有选项被覆盖。
这是我的域对象的一些示例代码:
@PersistenceCapable(identityType = IdentityType.DATASTORE, table = "jobs")
@Extension(vendorName = "datanucleus", key = "datastore", value = "store-email")
@Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
@DomainObjectLayout(cssClassFa = "envelope")
public class EmailSend implements Comparable {
@PrimaryKey(column = "email_id")
@Persistent(primaryKey = "true", valueStrategy = IdGeneratorStrategy.IDENTITY, column = "email_id")
@Property(editing=Editing.DISABLED)
private int id;
@Property(editing=Editing.DISABLED)
@PropertyLayout(multiLine = 5)
@Column(name = "text", length = 65535)
@Title(sequence = "1")
private String text;
...
@MemberOrder(sequence = "1")
public int getId() {
return id;
}
@MemberOrder(sequence = "2")
public String getText() {
return text;
}
...
}
列的顺序是随机的,所以没有@MemberOrder
工作。我的代码中的错误在哪里?