我是Apache ISIS的新手,我想通过带有遗留数据库(MYSQL)的dataNucleus获取一个列表,有300,000个数据,但是当我尝试使用repositoryService.allInstances()时获取List的方法,返回列表的大小是2.我有其他域对象,那些工作正常。 这是代码和调试信息。
@PersistenceCapable(
identityType = IdentityType.DATASTORE,
schema = "public",
table = "tinstruction_parameter_value"
)
@DatastoreIdentity(
strategy = IdGeneratorStrategy.IDENTITY,
column = "id")
@Queries({
@Query(
name = "find", language = "JDOQL",
value = "SELECT "
+ "FROM domainapp.modules.simple.dom.impl.xfs.parameter.InstructionParameterValueTest "),
@Query(
name = "findByValueContains", language = "JDOQL",
value = "SELECT "
+ "FROM domainapp.modules.simple.dom.impl.xfs.parameter.InstructionParameterValueTest "
+ "WHERE value.indexOf(:value) >= 0 "),
@Query(
name = "findByValue", language = "JDOQL",
value = "SELECT "
+ "FROM domainapp.modules.simple.dom.impl.xfs.parameter.InstructionParameterValueTest "
+ "WHERE value == :value ")
})
@DomainObject(
editing = Editing.DISABLED
)
@DomainObjectLayout(
bookmarking = BookmarkPolicy.AS_ROOT
)
public class InstructionParameterValueTest implements Comparable<InstructionParameterValueTest> {
@Column(allowsNull = "true",jdbcType = "CLOB")
@Property()
@MemberOrder(sequence = "10")
@Getter @Setter
private String value;
//region > compareTo, toString
@Override
public int compareTo(final InstructionParameterValueTest other) {
return org.apache.isis.applib.util.ObjectContracts.compare(this, other, "value");
}
@Override
public String toString() {
return org.apache.isis.applib.util.ObjectContracts.toString(this, "value");
}
//endregion
}
public class InstructionParameterValueTestRepository {
@Programmatic
public java.util.List<InstructionParameterValueTest> listAll() {
return repositoryService.allInstances(InstructionParameterValueTest.class);
}
}
我不知道为什么列表的大小是2,而不是所有数据,debug sql可以执行并获取所有数据。 dataNucleus sql execute 任何人都可以告诉我应该做什么,