Aaah Michael,
thanks!
This is awesome!
I tried a lot and all the time I felt that I missed exact this kind of easy
answer. ;)
Thanks again.
Will implement this now.
Sven
Am Dienstag, 30. Dezember 2014 17:01:14 UTC+1 schrieb Michael Bayer:
>
> why don’t you set up your PrimaryKeyConstraint dire
why don’t you set up your PrimaryKeyConstraint directly?
class AbstractPK(NameByClass):
""" this table defines a frequently used composite primary key """
@declared_attr
def key1(cls):
return Column(ForeignKey("somekey.keypart1"), primary_key=True)
@declared_attr
def
Am Freitag, 2. Juli 2010 02:24:05 UTC+2 schrieb Michael Bayer:
> The Column object contains a "sort key" when constructed, against a single
> global value, that is used as a sort key when the Table is generated. This
> is to get around the fact that the attribute dictionary of the declarative
> The order is determined by the order in which the actual Column constructor
> is called, and an ordering token is applied. When a mixin is used, the
> Column is copied from the mixin, but it's likely that the ordering token is
> preserved. You'd declare them on Foo directly without using
On Jul 1, 2010, at 8:24 PM, Michael Bayer wrote:
> The Column object contains a "sort key" when constructed, against a single
> global value, that is used as a sort key when the Table is generated. This
> is to get around the fact that the attribute dictionary of the declarative
> class is uno
Michael Bayer wrote:
I'd welcome any patches in this regard since I don't usually deal with the
"mixin" feature.
fine, how about Chris works up the unit test for it:
Done and pushed back to tip with the fix.
cheers,
Chris
--
You received this message because you are subscribed to the Goog
On Jul 1, 2010, at 8:24 PM, Michael Bayer wrote:
>
> The Column object contains a "sort key" when constructed, against a single
> global value, that is used as a sort key when the Table is generated. This
> is to get around the fact that the attribute dictionary of the declarative
> class is
On Jul 1, 2010, at 6:35 PM, Mike Lewis wrote:
>
>> Please provide a simple, small example of your problem :-)
>>
>> Also, is there a reason the order of column creation matters?
>>
>> Chris
>>
>> --
>> Simplistix - Content Management, Batch Processing & Python Consulting
>> -http:
> Please provide a simple, small example of your problem :-)
>
> Also, is there a reason the order of column creation matters?
>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
> -http://www.simplistix.co.uk
class Foo(object):
id = Column(Integ