Hi, IMHO the easiest way to do this is to define a hook that, on edge delete, also deletes connected vertices when needed. You can write the hook in Java or Javascript, see http://orientdb.com/docs/last/Hook.html
If you need further help just let me know Luigi 2015-05-27 9:55 GMT+02:00 neRok <[email protected]>: > Say I have a vertex class 'Notes', and if a note doesnt have an edge to > any other vertex, it should be deleted (ie I want to ensure they always > have an edge to something). Is there a way to do this, or should I handle > it in my code? > > I am using pyorient, so I presume the best way would be to check how many > edges the record has when I am deleting it. If it has 1, I should delete > the vertex (and thus the edge), and if more than 1 just delete the edge. > > -- > > --- > 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.
