Hi, I'm porting my app from SQLObject. Given the model below:

class Event(Entity):
    date = Field(DateTime)

class Person(Entity):
    events = ManyToMany("Event")

    @property
    def future_events(self):
        # what goes here?

I would like to create a property for Person that takes a relationship
and then further filters it (e.g. in the above example, by date.) In
SO I'd define the relation as a SQLRelatedJoin so that a.events would
return a QueryObj instead of an actual list, so I could do "return
self.events.filter(Event.q.date >= date.today())"

What would be the recommended way to do this with Elixir, or perhaps
this is an SO-centric pattern that there's a better way to do with SA/
Elixir?

Thanks -- Regards -- Andy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to