kerinin <[EMAIL PROTECTED]> writes:

> No, it's all happening in the controller, but i'm using a lot of 'for
> i in Person.select()' type things.  I've also set up some trinary
> relationship types in which i define a relationship class which has
> two objects which are related and a relationship type.  This requires
> retrieving a set of relationships (usually by filtering on two of the
> 3 properties) and then retrieving the the related object - for example
> if i had classes for people and familial relationships i could relate
> two people as being in a parent-child relationship or a granparent-
> grandchild relationship, i would then search for all relationships
> which include a certain person of the type parent-child and then
> retrieve (based on the returned relationships) the persons children.
> I know this is sort of contorted, but it allows me to have user-
> defined relationship types.

Maybe, then, your problem is on how you modeled your database.  If you
have to do too many queries, you'll have a seriour performance
degradation with an ORM.  If you have defined views for most of the
things then it will help regaining lost performance.

Also think about how your database optimize things and what data types
it is better for those relationships.  The use of artificial keys -- as
imposed by SQL Object, by default -- is at the same time a blessing and
a curse.  Think about that when defining relationships.

Also, using getters and setters and database functions really helps
since you just retrieve the minimum amount of data to get the
information you need (and if it is a list of "ids" then you can make a
query using "IN", to retrieve all desired objects).



-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to