Hi everyone!

I have a simple one-to-many relation between two classes, and I'm
trying to serialize/deserialize an "any" restriction on them.. My
problem is that deserialization fails with "maximum recursion depth
exceeded".
Am I doing something wrong?
Here's my testcase:


from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.ext import serializer
from sqlalchemy.orm import relation
from sqlalchemy.ext.declarative import declarative_base

# Tables definition
Base = declarative_base()

class Child(Base):
    __tablename__ = 'child'
    id = Column(Integer, primary_key=True)
    parent_id = Column(Integer, ForeignKey("parent.id"))
    data = Column(String)

class Parent(Base):
    __tablename__ = 'parent'
    id = Column(Integer, primary_key=True)
    children = relation(Child)

# Build "any" restriction
r = Parent.children.any(Child.data=="x")

# Serialize and deserialize it
ser = serializer.dumps(r)
serializer.loads(ser, Base.metadata)


Thanks for your time!
(tried with SQLA 0.5.0 and 0.5.2, Python 2.5.2)

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