I've tested a simplified test case on OrientDB 1.6.3, and it seems to work fine. Could you try with this version (direct download link<http://www.orientdb.org/portal/function/portal/download/[email protected]/a/a/a/a/France/orientdb-community-1.6.zip/false/false> )?
What i've tested (in a plocal console, with graph and document mode) : *Graph database* CREATE CLASS A extends V CREATE PROPERTY A.status STRING CREATE VERTEX A SET status='a' CREATE VERTEX A SET status='b' CREATE VERTEX A SET status='c' SELECT FROM A WHERE status IN ['a', 'b'] // 2 results CREATE INDEX A.status NOTUNIQUE SELECT FROM A WHERE status IN ['a', 'b'] // 2 results *Document database* CREATE CLASS A CREATE PROPERTY A.status STRING INSERT INTO A SET status = 'a' INSERT INTO A SET status = 'b' INSERT INTO A SET status = 'c' SELECT FROM A WHERE status IN ['a', 'b'] // 2 results CREATE INDEX A.status NOTUNIQUE SELECT FROM A WHERE status IN ['a', 'b'] // 2 results On Friday, January 10, 2014 4:33:18 PM UTC+1, Andrey Lomakin wrote: > > Just to track it. > https://github.com/orientechnologies/orientdb/issues/1952 > > > On Fri, Jan 10, 2014 at 5:27 PM, Andrey Lomakin > <[email protected]<javascript:> > > wrote: > >> Cool ! >> I will fix it, at Monday. >> >> >> On Fri, Jan 10, 2014 at 5:14 PM, Markus Menner >> <[email protected]<javascript:> >> > wrote: >> >>> I just managed to make the problem reproducible: >>> >>> package com.axxelia; >>> >>> import com.orientechnologies.orient.core.config.OGlobalConfiguration; >>> import com.orientechnologies.orient.object.db.OObjectDatabaseTx; >>> >>> public class OrientDBTest { >>> public static void main(String [] args) { >>> OGlobalConfiguration.CACHE_LEVEL1_ENABLED.setValue(false); >>> >>> OObjectDatabaseTx db = new OObjectDatabaseTx("memory:test"); >>> >>> if(!db.exists()) { >>> db.create(); >>> System.out.println("db.create()"); >>> } >>> >>> db.getEntityManager().registerEntityClasses("com.axxelia.domain"); >>> >>> try { >>> TestCase4.testCase(db); >>> } >>> finally { >>> db.close(); >>> } >>> } >>> } >>> >>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>> package com.axxelia; >>> >>> import com.axxelia.domain.*; >>> import com.orientechnologies.orient.core.record.impl.ODocument; >>> import com.orientechnologies.orient.core.sql.OCommandSQL; >>> import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery; >>> import com.orientechnologies.orient.object.db.OObjectDatabaseTx; >>> >>> import java.util.List; >>> >>> public class TestCase4 { >>> public static void testCase(OObjectDatabaseTx db) { >>> ItemWorkStep idt1 = new ItemWorkStep(); >>> idt1.setStatus(Status.NONE); >>> db.save(idt1); >>> >>> ItemWorkStep idt2 = new ItemWorkStep(); >>> idt2.setStatus(Status.STARTED); >>> db.save(idt2); >>> >>> WorkOrderWorkStep idt3 = new WorkOrderWorkStep(); >>> idt3.setStatus(Status.NONE); >>> db.save(idt3); >>> >>> WorkOrderWorkStep idt4 = new WorkOrderWorkStep(); >>> idt4.setStatus(Status.STARTED); >>> db.save(idt4); >>> >>> List<WorkOrderWorkStep> subs; >>> List<ODocument> counts; >>> >>> counts = db.query(new OSQLSynchQuery("SELECT count(*) FROM ItemWorkStep >>> WHERE status IN ['NONE', 'STARTED']")); >>> assert ((Long) (counts.iterator().next().field("count"))) == 4; >>> >>> counts = db.query(new OSQLSynchQuery("SELECT count(*) FROM >>> WorkOrderWorkStep WHERE status IN ['NONE', 'STARTED']")); >>> assert ((Long) (counts.iterator().next().field("count"))) == 2; >>> >>> db.command(new OCommandSQL("CREATE PROPERTY AdaptiveTask.status >>> STRING")).execute(); >>> >>> counts = db.query(new OSQLSynchQuery("SELECT count(*) FROM >>> WorkOrderWorkStep WHERE status IN ['NONE', 'STARTED']")); >>> assert ((Long) (counts.iterator().next().field("count"))) == 2; >>> >>> /** >>> * create the index >>> */ >>> db.command(new OCommandSQL("CREATE INDEX AdaptiveTask.status ON >>> AdaptiveTask (status) NOTUNIQUE")).execute(); >>> >>> /** >>> * huh!! those two tests fail. if you remove the index above, they will >>> succeed!!! >>> */ >>> counts = db.query(new OSQLSynchQuery("SELECT count(*) FROM >>> WorkOrderWorkStep WHERE status='NONE'")); >>> assert ((Long) (counts.iterator().next().field("count"))) == 1; >>> >>> counts = db.query(new OSQLSynchQuery("SELECT count(*) FROM >>> WorkOrderWorkStep WHERE status in ['NONE']")); >>> assert ((Long) (counts.iterator().next().field("count"))) == 1; >>> } >>> } >>> >>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>> package com.axxelia.domain; >>> >>> public class AdaptiveTask { >>> private Status status; >>> >>> public Status getStatus() { >>> return status; >>> } >>> >>> public void setStatus(Status status) { >>> this.status = status; >>> } >>> } >>> >>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>> package com.axxelia.domain; >>> >>> public class ItemWorkStep extends AdaptiveTask {} >>> >>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>> package com.axxelia.domain; >>> >>> public class WorkOrderWorkStep extends ItemWorkStep {} >>> >>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>> >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "OrientDB" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> Best regards, >> Andrey Lomakin. >> >> Orient Technologies >> the Company behind OrientDB >> >> > > > -- > Best regards, > Andrey Lomakin. > > Orient Technologies > the Company behind OrientDB > > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
