Thank you for the reply. I cannot use links in document model, and I suppose that graph model would be incorrect for me, because I need fast aggregations. (I hope documentDB has agregation at least as fast as relationals databases).
Anyway I can manually make links in both direction and write code, but it's make a danger of inconsistency. On Wednesday, June 21, 2017 at 10:21:57 AM UTC+2, Luigi Dell'Aquila wrote: > > Hi, > > Unfortunately the answer for both questions is NO. Links are > unidirectional, so finding records that link to a specific record is a very > expensive operation, this is why OrientDB does not provide support for this. > If you want automatic link management, I suggest you to use edges instead. > > There is a FIND REFERENCES command that checks for links that point to a > specific RID, but please consider that it's a very very expensive command > > Thanks > > Luigi > > > 2017-06-21 9:46 GMT+02:00 TomekK <[email protected] <javascript:>>: > >> In document model database I have classes: >> >> Group: >> +----+-----+------+-----+-------------+ >> |# |@RID |@CLASS|name |members | >> +----+-----+------+-----+-------------+ >> |0 |#25:0|Group |G1 |[#22:0,#21:0]| >> +----+-----+------+-----+-------------+ >> >> And Person: >> +----+-----+---------+---+-------+--------------+--------------+ >> |# |@RID |@CLASS|first |surname|phone |mail | >> +----+-----+------+------+-------+--------------+--------------+ >> |0 |#21:0|Person|Adam |Smith |+48 454648458 |[email protected] >> <javascript:> | >> |1 |#22:0|Person|Robert|Adams |+53 342023034 |[email protected] >> <javascript:>| >> +----+-----+---------+---+-------+--------------+--------------+ >> >> Now I want to delete #21:1 and have 2 questions: >> 1) Does OrientDB have a built in mechanism for automatic deleting links >> from G1.members? >> 2) Is there any way to project database that raising an exception in >> situation like this? >> >> >> -- >> >> --- >> 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.
