Hi fei,

This look quite weird, can you open an issue on github so we can track
and fix it ?

Thank you in Advance

Emanuel

On 12/25/2014 12:35 AM, fei wrote:
> Hi,
>
> With the code snippet:
>
>
> |
> privatestaticvoidtest(){
>     OPartitionedDatabasePooldatabasePool =
>         newOPartitionedDatabasePool("memory:sandbox","admin","admin");
>
>     /* create 3 Person docs */
>     try(ODatabaseDocumentTxdb =databasePool.acquire()){
>         db.begin();
>         ODocumentluke =newODocument("Person")
>            
> .field("name","Luke").field("friends",newHashSet<ODocument>());
>         ODocumentfriend1 =newODocument("Person")
>            
> .field("name","friend1").field("friends",newHashSet<ODocument>());
>         ODocumentfriend2 =newODocument("Person")
>            
> .field("name","friend2").field("friends",newHashSet<ODocument>());
>    
>         luke.save();
>         friend1.save();
>         friend2.save();
>
>         db.commit();
>     }
>
>     /* add 2 friends to Luke */
>     try(ODatabaseDocumentTxdb =databasePool.acquire()){
>         db.begin();
>
>
>         OSQLSynchQuery<ODocument>query =newOSQLSynchQuery<ODocument>(
>             "select from Person where name = ?");
>
>
>         ODocumentluke
> =((List<ODocument>)db.command(query).execute("Luke")).get(0);
>         ODocumentfriend1
> =((List<ODocument>)db.command(query).execute("friend1")).get(0);
>         ODocumentfriend2
> =((List<ODocument>)db.command(query).execute("friend2")).get(0);
>
>         Set<ODocument>friendsLink =luke.field("friends",OType.LINKSET);
>         friendsLink.add(friend1);
>         friendsLink.add(friend2);
>
>         luke.save();
>         db.commit();
>     }
>
>     /* check type of objects returns in the "friends" mv link */
>     try(ODatabaseDocumentTxdb =databasePool.acquire()){
>         OSQLSynchQuery<ODocument>query =newOSQLSynchQuery<ODocument>(
>             "select from Person where name = ?");
>
>         ODocumentluke
> =((List<ODocument>)db.command(query).execute("Luke")).get(0);
>
>         Objectfriends =luke.field("friends",OType.LINKSET);
>
>
>         for(Objectfriend:(Collection<?>)friends){
>             System.out.println("
> "+friend.getClass().getSimpleName());  <---prints
> "ORecordId"in2.0RC1,prints ODocumentin1.7.9
>         }
>     }
> }
> |
>
> In 1.7.9, multi-valued link field returns a collection of
> ODocument(expected), but in 2.0 RC1 it returns a collection of ORecordId.
>
> Is this a bug in 2.0 RC1 or am I missing something?
>
> I am using memory storage.
>  
> Thanks!
>
> fei
>
>
>
> -- 
>
> ---
> 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]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
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/d/optout.

Reply via email to