On Feb 11, 2008, at 9:17 AM, Werner F. Bruhin wrote:

>
> When I try to save an item/object I get the following exception:
>
> Traceback (most recent call last):
>   File "C:\Dev\twcb\Program\dialogcontainer.py", line 418, in  
> OnSaveButton
>     mlDialogs.SaveData(self)
>   File "C:\Dev\twcb\Program\multilangdialogs.py", line 34, in SaveData
>     self.Getds().save(self.dbLMItem)
>   File
> "c:\python25\lib\site-packages\SQLAlchemy-0.4.0-py2.5.egg\sqlalchemy 
> \orm\session.py",
> line 793, in save
>     _object_mapper(object).cascade_callable('save-update', object,
>   File
> "c:\python25\lib\site-packages\SQLAlchemy-0.4.0-py2.5.egg\sqlalchemy 
> \orm\mapper.py",
> line 1613, in object_mapper
>     raise exceptions.InvalidRequestError("Class '%s' entity name '%s'
> has no mapper associated with it" % (object.__class__.__name__,
> getattr(object, '_entity_name', entity_name)))
> InvalidRequestError: Class 'Mapper' entity name 'None' has no mapper
> associated with it
>

the "entity name" part of the message there is only trying to identify  
which mapper the given object is mapped to.  but in this case it looks  
like you are saving an actual Mapper object (when you should be  
sending one of your application's object instances), so thats the  
error, i.e.

m = mapper(...)

sess.save(m)  # <-- error !


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