Issue 381 in morphia: unable to query using com.​google.​code.​morphia.​query.​FieldEnd.in(Iterable itrbl)

0 views
Skip to first unread message

mor...@googlecode.com

unread,
Feb 22, 2012, 1:59:17 AM2/22/12
to morphia...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Low

New issue 381 by manolach...@gmail.com: unable to query using com.​google.​
code.​morphia.​query.​FieldEnd.in(Iterable itrbl)
http://code.google.com/p/morphia/issues/detail?id=381

What version are you using? (Morphia/Driver/MongoDB)
I am using morphia-0.99.jar/mongo-java-driver-2.3.jar/mongodb-2.0.

Please include a stack trace below:
Before describing my problem, I would like to tell you that it worked fine
with morphia-0.98.jar/mongo-java-driver-2.3.jar/mongodb-2.0.

===================================================================
|PROBLEM |
===================================================================
I am trying to create a Query with multiple filter conditions like:
SELECT * from COMPONENT
WHERE COMPONENT.TYPE = TYPE_INDIFFERENT OR COMPONENT.TYPE = TYPE_CORE

For this, i used the following code sequence:

Query q = datastore.createQuery(Component.class);
if (null != componentSearchCriteria.getComponentType()) {
List<ComponentType> componentTypes = new ArrayList<ComponentType>();
componentTypes.add(componentSearchCriteria.getComponentType());
componentTypes.add(ComponentType.TYPE_INDIFFERENT);
q.field("componentInformation.componentType").in(componentTypes);
}
===================================================================

mor...@googlecode.com

unread,
Feb 22, 2012, 2:03:19 AM2/22/12
to morphia...@googlegroups.com

Comment #1 on issue 381 by manolach...@gmail.com: unable to query using
com.​google.​code.​morphia.​query.​FieldEnd.in(Iterable itrbl)
http://code.google.com/p/morphia/issues/detail?id=381

no exception thrown

mor...@googlecode.com

unread,
Feb 23, 2012, 12:41:32 AM2/23/12
to morphia...@googlegroups.com

Comment #2 on issue 381 by scotthernandez: unable to query using com.​
google.​code.​morphia.​query.​FieldEnd.in(Iterable itrbl)
http://code.google.com/p/morphia/issues/detail?id=381

Can you try with the latest snapshot please?

mor...@googlecode.com

unread,
Feb 24, 2012, 6:39:35 AM2/24/12
to morphia...@googlegroups.com

Comment #3 on issue 381 by manolach...@gmail.com: unable to query using
com.​google.​code.​morphia.​query.​FieldEnd.in(Iterable itrbl)
http://code.google.com/p/morphia/issues/detail?id=381

Hi,

Thanks for your quick response.

Just tested with morphia 0.99.1-SNAPSHOT.jar, and it generates the
following error during unit testing:

==================================================================================
Testing delete component...
2012-02-24 13:32:52,078 INFO [main]
com.company.lps.oodbcore.services.OODBComponentService - Deleting
components...
------------- ---------------- ---------------
------------- Standard Error -----------------
Feb 24, 2012 1:32:00 PM
com.google.code.morphia.logging.MorphiaLoggerFactory chooseLoggerFactory
INFO: LoggerImplFactory set to
com.google.code.morphia.logging.jdk.JDKLoggerFactory
------------- ---------------- ---------------
Testcase:
test_deleteComponent(com.company.lps.oodbcore.tests.ComponentJUnitTest):
Caused an ERROR
com.google.code.morphia.Datastore.delete(Lcom/google/code/morphia/query/Query;)V
java.lang.NoSuchMethodError:
com.google.code.morphia.Datastore.delete(Lcom/google/code/morphia/query/Query;)V
at
com.company.lps.oodbcore.services.OODBComponentService.deleteComponents(OODBComponentService.java:224)
at
com.company.lps.oodbcore.tests.ComponentJUnitTest.test_deleteComponent(ComponentJUnitTest.java:200)


Test com.company.lps.oodbcore.tests.ComponentJUnitTest FAILED
debug-test:
Deleting:
C:\Users\ionutm\AppData\Local\Temp\TEST-com.company.lps.oodbcore.tests.ComponentJUnitTest.xml
BUILD SUCCESSFUL (total time: 1 minute 29 seconds)


Reply all
Reply to author
Forward
0 new messages