I have follow up questions. This is my first try to bring one part of our system into OrientDB. Something a bit more than playing with GracefulDead stuff. As I understand there are several approaches to present 1-2-Many relationship, as well as 1-2-One - (1) create a LINK from one class to another, (2) create field types as Embedded Documents (or containers with Embedded Documents). Are there any recommendations in which cases use what when you are trying to model your database ?
Thank you. Galina On Friday, June 27, 2014 10:40:26 AM UTC-7, galina manashirova wrote: > > Hi Artem; > > I removed all records from ID table, re-inserted them using your suggested > way. > Then run your query and it worked fine. > > Thank you! > > -Galina > > > > On Thursday, June 26, 2014 2:33:26 AM UTC-7, Artem Orobets wrote: >> >> Hi Galina, >> >> 2014-06-26 1:44 GMT+03:00 galina manashirova <[email protected]>: >> >>> Is "bold" section the correct way of storing reference to the Pool class? >> >> >> No. In this way you inserted a projection into the document, the correct >> will be >> insert into ID ( idname, Poolname,sessiontype, allocated, timedout, hold, >> username, update_ts) >> VALUES >> ( "idname121", *(select from Pool where Poolname="UserNamePool")*, >> "alc", 0, 0, 0, "PeggySue", "2010-07-06 10:00:000") >> >> The next mistake is in the query, you named a property of ID 'Poolname', >> but it is not a name it is a link to a pool, so the selective query will be >> select from ID where Poolname.Poolname='UserNamePool' >> >> I've checked this query and works fine. >> >> >> Best regards, >> Artem Orobets >> >> * Orient Technologiesthe 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/d/optout.
