On Apr 26, 2007, at 9:46 AM, Gaetan de Menten wrote:

>
> But nevermind the patch I did. I realize now it's pretty much useless.
> But what about the approach I discussed in my previous mail? (using
> what is in the relation loaders but without creating the instances)
>

well as ive said, id like it to support scalars or collections, and  
to be writeable...it would generally be used for values loaded from  
another table that are returned as non-entities, like integers,  
strings, etc.  the corresponding feature in hibernate is http:// 
www.hibernate.org/hib_docs/v3/reference/en/html/ 
collections.html#collections-ofvalues , except as usual we have the  
"uselist=False" option which allows it to be just one element.

I kind of feel like i have to experiment with hibernate to see  
exactly what the second option there, "formula='any sql expression'",  
actually does.  im not sure if the feature covers the specific thing  
you want to do.  at the very least, if you mapped to an aggregate  
thered be a "viewonly=True" thing happening there.

implementation-wise, our entity-mapping capabilities are the best way  
to handle keeping track of these elements and writing them back to  
the DB, so it would at some level use mapped entities that are  
handled behind the scenes.   you think its a bad idea because youre  
looking at it as something bolted on to the outside, but it doesnt  
have to be that way.  its likely that it  may be best handled as a  
collection of entities that is only generated at flush time against  
the mapped collection, within the dependency processor itself.   the  
attribute instrumentation system would need some tweaks to support  
collections of non-entities as well (which i think is probably not a  
big deal, if even it cant do it already).



--~--~---------~--~----~------------~-------~--~----~
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