Hi
I checked out sa 0.7b and found an issue concerning CompositePropery.
In declarative.py at line 982 is says:
if isinstance(c, (ColumnProperty, CompositeProperty)):
and then accesses the 'columns'-property of c, which in my case is not
present in CompositeProperty, since attributes are stored in 'self.attrs'
rather than in 'self.columns'. I removed the instance check for
CompositeProperty. But now this isn't working anymore:
skonto = composite(Discount,
Column('discount_percentage',Float,nullable=True),
Column('discount_amount', Float, nullable=True),
Column('discount_currency_id', ForeignKey('
currencies.id'), nullable=True))
I had to replace it with:
_discount_percentage = Column('discount_percentage',Float,nullable=True)
_discount_amount = Column('discount_amount', Float, nullable=True)
_discount_currency_id = Column('discount_currency_id', ForeignKey('
currencies.id'), nullable=True)
skonto = composite(Discount, _discount_percentage, _discount_amount,
_discount_currency_id)
So 1st. Is that instance check a bug? and 2nd are composites now ment to do
the second way?
Best Regards,
Florian
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.