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

> 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 <+48%20454%20648%20458> |
> [email protected] |
> |1   |#22:0|Person|Robert|Adams  |+53 342023034 |[email protected]|
> +----+-----+---------+---+-------+--------------+--------------+
>
> 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].
> 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.

Reply via email to