[sqlalchemy] polymorphic_identity as an expression

2015-08-20 Thread Richard Gerd Kuesters

hello!

is it possible to set the polymorphic_identity mapper param as an 
expression?


example:

   __mapper_args__ = {
polymorphic_identity: in_('employee', 'recruit')
   }



thanks a lot,
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/d/optout.
attachment: richard.vcf

Re: [sqlalchemy] polymorphic_identity as an expression

2015-08-20 Thread Mike Bayer
polymorphic_identity, no.  polymorphic_on, yes.work it from that end 
instead (e.g. using CASE).





On 8/20/15 10:05 AM, Richard Gerd Kuesters wrote:

hello!

is it possible to set the polymorphic_identity mapper param as an 
expression?


example:

__mapper_args__ = {
polymorphic_identity: in_('employee', 'recruit')
}



thanks a lot,
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 
mailto:sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com 
mailto:sqlalchemy@googlegroups.com.

Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


--
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/d/optout.


Re: [sqlalchemy] polymorphic_identity as an expression

2015-08-20 Thread Richard Gerd Kuesters
thanks mike! that's what i thought, but was wondering if there were a 
shortcut using identity :)


cheers,
richard.


On 08/20/2015 12:15 PM, Mike Bayer wrote:
polymorphic_identity, no.  polymorphic_on, yes.work it from that 
end instead (e.g. using CASE).





On 8/20/15 10:05 AM, Richard Gerd Kuesters wrote:

hello!

is it possible to set the polymorphic_identity mapper param as an 
expression?


example:

__mapper_args__ = {
polymorphic_identity: in_('employee', 'recruit')
}



thanks a lot,
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 
mailto:sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com 
mailto:sqlalchemy@googlegroups.com.

Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


--
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 
mailto:sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com 
mailto:sqlalchemy@googlegroups.com.

Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


--
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/d/optout.
attachment: richard.vcf