Hi everyone,

I have a problem using the following code (with sqlalchemy 0.3.6 and python2.5):


mapperA = mapper(MyClass, self.tables['report_ia'], entity_name = 'REPIA', 
primary_key=[self.tables['report_ia'].c.id])

mapperB = mapper(MyClass, self.tables['report_ib'], entity_name = 'REPIB', 
primary_key=[self.tables['report_ib'].c.id])


customSelect = select(
        [
                mapperA.c.id,
                mapperA.c.uid,
                func.count(mapperA.c.itemcount).label("itemcount"),
        ],
        mapperA.c.owner.in_( 'User' ) ),
        group_by=[mapperA.c.uid, mapperA.c.id]
).alias("totals")
                
customMapper = mapper(MyClass,
        customSelect,
        entity_name = "temporary",
        primary_key = [ customSelect.c.id ],
)
                
result = self.session.query(customMapper).select()
                
clear_mapper(customMapper)


Running that I get:

Processing Failure
c
/usr/lib/python2.5/site-packages/sqlalchemy/orm/__init__.py:110:clear_mapper]


What am I doing wrong here?
Any help would be appreciated.

Thanks,
Kevin

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