Hi,
Sorry if my question is not full sqlalchemy related.

How can I find in an object list, a particular object, by his field
value ?

i.e.:

class Person(object)
     def __init__(self, id, name):
          self.id = id
          self.name = name

# Get a person object list
people = session.query(Person).filter_by().all()

# WARNING: It's not sqlalchemy (no python), is only an example
person_1 = people.locate('id', 1)   # With this, I get the person
object where person.id = 1

How can I do it?
(or I have programming my custom search).


TIA.






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

Reply via email to