On Apr 8, 10:12 am, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Apr 8, 11:05 am, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
>
> > When I do this, I receive this error that seems to occur on the merge():
> > Class 'History' entity name 'None' has no mapper associated with it.
>
> > I've tried supplying an entity name in the merge() call, but I'm
> > unsure what that name should be. I also toyed with the dont_load=True
> > attribute since (if I understand save() correctly) this history object
> > will not exist as a row in the DB.
>
> > Can someone point in the right direction here with what I am trying to do?
>
> this situation occurs because there is no mapper configured for the
> "History" class when it is deserialized into the new HTTP process.
> the "entity_name" part of the error is not significant here and I
> should probably not have it say anything about entity name in the
> usual case.

Thanks for the clarification.

> as to why theres no mapper, for a straight SA application it would be
> because the module which configures the mappings hasn't yet been
> imported in that process; for elixir, you might need to do their
> "setup_all()" call to ensure their stuff is set up.

The setup_all() call seemed to solve the issue with the mapper. Now,
I'm getting an error like:

'ColumnProperty' object has no attribute 'key'

when I attempt the session.merge(). The column it seems to happen with
is defined as:

id = Field(Integer,
PassiveDefault(text("nextval(('history_seq'::text)::regclass)")),
colname='history_id', primary_key=True)

This could be because of the interesting PassiveDefault stuff or just
because this is the first field defined in the History() class.

Thanks again for your help. This is SA 0.4.5 in case it matters. ;)

/alex


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to