So if I get a doc copy without a reference to the original record, how do I get the actual rid? The design was to return a few fields with the rid and then allow the user to get a detailed view as needed.
What patterns or approaches are recommended? Thanks. On Tuesday, June 17, 2014 1:17:28 AM UTC-6, Artem Orobets wrote: > > Hi Erik, > > This related to how SQL projections works. > When you specify a projection you might want to see the document that > contain only fields that you have specified. So imagine that you got a > document that represent a real document but without some fields, if you do > any changes to that document and save it you might loose some fields that > had not been loaded, because there is no way to figure out are the fields > were not loaded or you removed them from document. And there is also might > be a function calls and field chains that add some values that is not > contained in original document. > But users almost never want to change documents selected in such way, so > to make this use cases safe from mistakes projections create a new document > where copy all fields specified in projection. > > That's why behavior that you described is expected. > > Best regards, > Artem Orobets > > *Orient Technologies the Company behind OrientDB* > > > 2014-06-17 9:11 GMT+03:00 Erik Peterson <[email protected] <javascript:>> > : > >> I get the following results from code or studio... 1.7.3 >> >> Three scenarios: >> select from contacts => proper rid >> select name from contacts => bad rid >> select @rid, name from contacts => bad @rid and good rid >> >> A result set with bad rid's in in form: #-2:1, #-2:2,...,#-2:N >> >> It looks like there are temporary rid's being assigned in some cases. Is >> this known and how to work around please. >> >> >> >> -- >> >> --- >> 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/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.
