To fetch all the Writer objects, you simply write:
objects=ec.fetch('Writer')
That's it.
Now what if you want the Writer objects whose last name is
'Hugo'
? That's not really more complicated:
objects=ec.fetch('Writer', qualifier='lastName=="Hugo"')
This is almost all you need to fetch any object from the database: just identify the type of the objects you're fetching, and the qualifier describing them. Everything is then done automatically, i.e. the correct SQL statement(s) are built and executed and the objects are then built from the retrieved rows and given back to you in a sequence.
In the next sections, we will see more complete examples, but it basically always this line that you'll use for fetching objects.
Comments are welcome: Sebastien Bigaret / Modeling Home Page