phrrn...@googlemail.com wrote:
>
> I have a MapperExtension which defines one method, instrument class.
> This method in turn pokes in a number of convenience methods such as
> lookup, search and a custom __str__ and __repr__. We do this dynamic
> instrumentation to avoid having to inherit from a common base class.
>
>     mapper(ModelPresentValue, model_present_value, extension=banana)
>
>
> The problem is with an UPDATE that attempts to set the PK values to
> NULL (see error text below. Note the bind values [None, None, 32,
> 100]).
>
> When I remove the extension, everything works fine. I intend to debug
> this further during the course of the day but wanted to see if anyone
> might be able to see straight off what the problem is (my thought is
> that I am simply not implementing enough of the extension hooks)

its possibly something with the attributes you are attaching.  with the
MapperExtension you only need to redefine the hook you care about.   some
ME methods have special return values that are required too, make sure
you're returning what the base MapperExtension class returns if you are
overriding those (it sounds like you shouldnt be overriding any).

>
> regards,
> pjjH
>
>
>
> sqlalchemy.exc.IntegrityError: (IntegrityError) ('23000', "[23000]
> [FreeTDS][SQL Server]Cannot insert the value NULL into column 'md5id',
> table 'sa_test.dbo.model_present_value'; column does not allow nulls.
> UPDATE fails. (515)") u'UPDATE model_present_value SET md5id=?,
> scenario=? WHERE model_present_value.md5id = ? AND
> model_present_value.scenario = ?' [None, None, 32, 100]
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to