sure it can.   you’d just need to be defining accessors and methods for all the 
things it needs to do in each case - these accessors would use the components 
to produce the appropriate SQL constructs as needed.



On Dec 4, 2013, at 1:23 PM, Richard Gerd Kuesters <rich...@humantech.com.br> 
wrote:

> hi all!
> 
> i was wondering if there is a way to create "fake" models, in which i can 
> query the way I want and map methods the way i want.
> 
> let's say i have a common object that is made in pieces to the database 
> (similar to the eav pattern), stored in multiple tables. now, backwards, i 
> have to make a whole mess of code to bring the object with data again, but it 
> works fine, so far.
> 
> what I really wanted was to use this class like a mapped model, using 
> session.query, filters and stuff, abstracting its keys to other attributes 
> and conditionals for the *real* table structure.
> 
> the problem is: can it be made?
> 
> 
> thanks in advance,
> richard.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/groups/opt_out.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to