Open ahri opened 14 years ago
Can maybe retro-fit this into the relationship loader so that it doesn't need to perform 2 queries as is currently the case.
This is basically DSL territory, and should be considered thoroughly. Will we be able to specify WHERE clauses in the chains, too?
Suggested syntax: A [foo > 2] -> (Rel1) -> B -> (Rel2 [a = 'bar']) -> C
Multiline might be nicer for longer ones?
A [foo > 2] ->
(Rel1) ->
B ->
(Rel2 [a = 'bar']) ->
C
Or perhaps a newline implies a -> ?
A [foo > 2]
(Rel1)
B
(Rel2 [a = 'bar'])
C
Should specify with an asterisk after the name if you want an object back.
A* [foo > 2]
(Rel1)
B
(Rel2 [a = 'foo', b = 'bar'])
C*
Re-implement old idea (from Orm) of "chaining".
Should be able to specify "chain" of classes and relationships to be able to efficiently pull out a set of objects.
e.g. A -> (Rel1) -> B -> (Rel2) -> C