I have created class in pyorient ogm
class Movie(Node):
element_plural = "Movies"
title = String(mandatory=True,indexed=True)
rating = Short()
class Person(Node):
element_plural = "Person"
name = String(mandatory=True,indexed=True)
class ACTS_IN(Relationship):
element_plural = "ACTS"
name = String()
out_ = Link(linked_to=Person,mandatory=True)
in_ = Link(linked_to=Movie,mandatory=True)
class PRODUCED(Relationship):
element_plural = "Producers"
out_ = Link(linked_to=Person,mandatory=True)
in_ = Link(linked_to=Movie,mandatory=True)
How to I return all details of a particular Movie with actors and producers. Should i call multiple queries for getting details of movie, actors and producers?
Select * from Movie where title='Test'
select expand(ine()).in() from Movie where title = 'Test'
Will it not work as for foreign key?
Try this:
Hope it helps
Regards