Keith, Thanks for taking the time to answer it.
Do you mean: create index hasC.in unique Or create another edge from C back to B, and make it unique? Anyway, I may be mistaken but I don't think that work. Adding that unique index from C back to B would guarantee a single B for each C, is that correct? That's unwanted. One C can have many B, but one B must have at most one C. Do you understand? Em segunda-feira, 9 de fevereiro de 2015 14:22:27 UTC-2, Keith Freeman escreveu: > > How about adding another unique index from C back to B? That would > guarantee a single C for each A in your example, right? > > On Monday, February 9, 2015 at 4:12:17 AM UTC-7, Lucas de Oliveira > Teixeira wrote: >> >> Anybody has any clue for this problem? >> >> Em segunda-feira, 2 de fevereiro de 2015 22:40:33 UTC-2, Lucas de >> Oliveira Teixeira escreveu: >>> >>> Hi guys, >>> >>> Suppose I have three different classes of vertices: A, B and C; and I >>> have two edges connecting them: hasB connects A to B and hasC connects B to >>> C. >>> To summarize: >>> A -> hasB -> B -> hasC -> C >>> >>> I'm able to ensure that each vertex of class A has at most one edge to B >>> using the following index: >>> create index hasB.out unique >>> Same thing for B and C: >>> create index hasC.out unique >>> >>> My problem is that those indexes does not ensure that one A is >>> associated with at most one C. >>> Well, this question may have been asked before, but I was unable to find >>> any answer or solution. >>> I have crawled through the documentation and also did not find anything. >>> >>> Btw, I have been using OrientDB for a couple of weeks in a project for >>> large-scale data analysis and it just awesome! >>> >> -- --- 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.
