On Jun 17, 1:06 pm, "Werner F. Bruhin" <[EMAIL PROTECTED]> wrote:
> I just got beta1 and I run into a problem with the following:
>
> sa.Column(u'consumedvalue', sa.Numeric(precision=18, length=2,
> asdecimal=True), sa.PassiveDefault("")),
>
> consumedvalue is a readonly column (i.e. computed by Firebird SQL) and I
> am getting the following exception when I try to debug (in Boa), the
> same happens if I change the above to use ....server_default="".
>
> Do I need to change something else in the model. For each of these type
> of columns I also have the following:
>
> class Consumption(object):
> def consumedvalue(self):
> return self._consumedvalue
> consumedvalue = property(consumedvalue)
the mapper will automatically map the "consumedvalue" column to the
"consumedvalue" attribute on the class. The descriptor you've placed
there conflicts with it. You need to tell the mapper about the
"_consumedvalue" name you're using, which is illustrated here:
http://www.sqlalchemy.org/docs/05/mappers.html#advdatamapping_mapper_overriding
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---