Sorry for the delay.  I actually didn't see you had responded.

Just change your query to this:

select from (select expand(file_link) from folder) where file_name = "file1"

Regards,

-Colin

Orient Technologies

The Company behind OrientDB

On Tuesday, March 17, 2015 at 2:01:21 PM UTC-5, Ghosty Huan wrote:
>
> Any update on why the documentation example, and the custom example I 
> provided does not exhibit the expected behavior of a join?
>
> On Thursday, March 12, 2015 at 1:56:58 AM UTC-7, Ghosty Huan wrote:
>>
>> Hi, I'm currently testing out Orientdb 2.0.2 by implementing a document 
>> database that was originally designed for a rdbms. I do not have any old 
>> data to import so if I was wondering if anyone has suggestions on the best 
>> way to implement the following requirements specifically in Orient. I have 
>> attempted using the online guide for migrating from an rdbms but it has 
>> proved troublesome so I thought I would ask here and make sure I'm on the 
>> right path or if Orient has a feature I'm overlooking.
>>
>> A simplified idea of my data is this:
>>
>> Drive
>> =======
>> driveID
>> other properties...
>>
>> Folder
>> =======
>> folderID
>> FK_driveID
>> other properties...
>>
>> File
>> =======
>> fileID
>> FK_folderID
>>
>> As for requirements:
>> I need to be able to have join like behavior in queries. For example I 
>> need to select files based on the properties of their parent folders/drives 
>> or select drives based properties of their folders/files.
>> I previously tried to do this with drives/folders/files as their own 
>> classes with links inbetween as the 'migrating from rdbms' guide showed, 
>> but when I queried a drive based on folder properties(or vice versa) it 
>> would return 0 results. No clue why this happened because if I queried for 
>> the links field in drive they were all correct references to records in 
>> folder.
>>
>> I need to be able to insert new drives/folder/files with new links. When 
>> I first browsed orientDB's documentation I did not realize that CREATE LINK 
>> only affected existing data and to insert new data you must manually insert 
>> a new link by querying for the correct RID to link. Is there is a way for 
>> me to avoid this or avoid links altogether by embedding classes or some 
>> other technique?
>>
>> So in summary, does anyone have a suggestion for a implementing this 
>> using Orient's specific capabilities? If not, and the 'migrating from 
>> rdbms' approach is correct then any clue why why my joined queries would 
>> return zilch?
>>
>

-- 

--- 
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