Sorry if I’m missing something basic and/or pretty obvious but I don’t know how
to model collections of different types/classes.
For example, let’s say I have these base types/classes:
class Chicken(Base):
__tablename__ = ‘chicken'
id = Column(Integer, primary_key=True)
name = Colu
> On Nov 17, 2014, at 1:55 PM, Guido Winkelmann
> wrote:
>
>
> Am Montag, 17. November 2014 16:25:54 UTC+1 schrieb Michael Bayer:
>
>> On Nov 17, 2014, at 7:37 AM, Guido Winkelmann
>> > wrote:
>>
>> Hi,
>>
>> How can I go about having a cross-platform compatible compound unique
>> constra
Am Montag, 17. November 2014 16:25:54 UTC+1 schrieb Michael Bayer:
>
>
> On Nov 17, 2014, at 7:37 AM, Guido Winkelmann <
> gu...@ambient-entertainment.de > wrote:
>
> Hi,
>
> How can I go about having a cross-platform compatible compound unique
> constraint over two columns where there can be onl
> On Nov 17, 2014, at 7:37 AM, Guido Winkelmann
> wrote:
>
> Hi,
>
> How can I go about having a cross-platform compatible compound unique
> constraint over two columns where there can be only one record with NULL in
> one column and a given value in the other?
>
> I want something like thi
Hi,
How can I go about having a cross-platform compatible compound unique
constraint over two columns where there can be only one record with NULL in
one column and a given value in the other?
I want something like this:
UniqueConstraint("parent_id", "name")
except "parent_id" is nullable, an