Il 28/12/2016 11:39, Fabio Rinnone ha scritto: > Another question: if I want to project all attributes of classes what do > I do? In other words, how I can do a query as following in OrientDB? > > select demo.*, drug.* from demo, drug where demo.primaryid = drug.primaryid
Please, can someone help me to translate this query in OrientDB? I think
it's a very simple question: for this moment my only solution is to
project all attributes explicitly but with this approach I think query
is too long.
This is my actual solution:
select
primaryid,
caseid,
caseversion,
i_f_code,
$drug.drug_seq,
$drug.role_cod,
$drug.drugname,
$drug.prod_ai
from demo
let $drug = in('drugToDemo')
unwind drug_seq, role_cod, drugname, prod_ai
Relationship beetween demo and drug is the following:
drug --> (drugToDemo) --> demo
Relationship type is 1-to-n.
In my example I suppose that number of attributes of demo and drug class
are respectively 4 but in my real case they are more than 4 and the real
query is more long than this.
Thanks in advance.
--
Fabio Rinnone
Skype: fabiorinnone
Web: http://www.fabiorinnone.eu
--
---
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.
signature.asc
Description: OpenPGP digital signature
