On 26 Jun 2006 at 22:10, Michael Bayer wrote:

> noload() is used only for multi-table relations(), to indicate that a  
> secondary relation should not be eager or lazy loaded.

Oh. Yeah, I thought noload would work like defer. The docs aren't clear that 
the 
load options (eager, lazy, no) are only for related tables and not attributes.  
And 
reading the docstring for noload, it's very similar to the docstring for defer. 

what about assign_mapper not putting options() on the class? Is that an 
oversight?


> 
> what youre looking for is almost like "deferred column  
> loading" (http://www.sqlalchemy.org/docs/ 
> adv_datamapping.myt#advdatamapping_properties_deferred)  but i guess  
> you are doing this more for security reasons rather than  
> performance.  i dont know if SA really has a feature that exactly  
> fits that idea...you could try making a second mapper that maps to a  
> select statement, which doesnt include the column that you want to  
> obscure.  or, just have your mapped object "hide" the field (youre  
> not exposing the object to untrusted code, are you?)

The returned row object is converted to XML by code that dumps __dict__ 
contents.

I just changed "noload" to "defer" and hey, it does what I want. Probably works 
because I'm accessing the __dict__ directly rather than going through the 
object's 
__getitem__ or __getattr__




-- 
Brad Clements,                [EMAIL PROTECTED]    (315)268-1000
http://www.murkworks.com                          
AOL-IM or SKYPE: BKClements



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to