On Friday, December 30, 2011 8:26:45 PM UTC-8, Michael Bayer wrote: > > > On Dec 30, 2011, at 7:46 PM, Arturo Sevilla wrote: > > Nope, the problem persists, but not with the unpickle process but after it > with composite attributes. For example, I have the first_name attribute on > User, but also contact which is a MutableComposite. If I do the following > (after the unpickle process): > > assert user.first_name = 'name' > > I don't get an error. But if I do: > > assert user.contact.email == 'em...@example.com' > > I get the same error (AttributeError on _sa_instance_state). Details: > > File "/model/security/__init__.py", line 308, in contact > return self._contact > > > is that the full stack trace? Id need to see this from the original call > to understand it. if you want to attach all of these as one big series > of test cases, with a fixture that sets up the model, then isolated > examples of each non-working thing inside of individual functions, I can > play with it at some point. > > > I left out only another function (@hybrid_property def contact). But... this last error was my fault, I forgot I played with __getstate__ in the base class for all my entities. Now is working (after the modification of _get_id() as described). Thanks for everything.
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/-SRNVNO1yuwJ. 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.