google-code-export / slim3

Automatically exported from code.google.com/p/slim3
1 stars 1 forks source link

In-memory filter for ModelRef property causes IllegalStateException #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following in-memory filter for ModelRef property causes
IllegalStateException.

Bbb bbb = new Bbb();
bbb.getHogeRef().setModel(new Hoge());
Datastore.put(bbb);
BbbMeta m = BbbMeta.get();
Datastore.query(Bbb.class)
    .filterInMemory(m.hogeRef.equal(Datastore.createKey("Hoge", 1)))
    .sortInMemory(m.hogeRef.asc).asList();

java.lang.IllegalStateException: The property(hogeRef) of
model(org.slim3.datastore.model.Bbb) is not comparable.
    at
org.slim3.datastore.AbstractCriterion.compareValue(AbstractCriterion.java:77)
    at org.slim3.datastore.EqualCriterion.accept(EqualCriterion.java:65)
    at org.slim3.datastore.DatastoreUtil.accept(DatastoreUtil.java:1158)
    at org.slim3.datastore.DatastoreUtil.filterInMemory(DatastoreUtil.java:1145)
    at org.slim3.datastore.ModelQuery.asList(ModelQuery.java:333)
    at org.slim3.datastore.SpikeTest.spike(SpikeTest.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java
:44)
    at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
    at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:4
1)
    at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20
)
    at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76
)
    at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50
)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReferen
ce.java:46)
    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:467)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:683)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java
:390)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.jav
a:197)

Original issue reported on code.google.com by higaya...@gmail.com on 20 Mar 2010 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by higaya...@gmail.com on 20 Mar 2010 at 9:23

GoogleCodeExporter commented 9 years ago

Original comment by higaya...@gmail.com on 6 Apr 2010 at 8:31