[sqlalchemy] Re: Trac feed broken
On Tue, Feb 17, 2009 at 03:14, Michael Bayer mike...@zzzcomputing.com wrote: it says to me: Congratulations! [Valid RSS] This is a valid RSS feed. im not able to reproduce any issue in the straight FF reader. Seems like somebody else fixed it, because it works today. -- Gaëtan de Menten http://openhex.org --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Infinite recursion trying to deserialize any restriction
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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: A question about best practices after the Object Relational Tutorial
I have written a descriptor for implementing hashed storage of passwords. I added some documentation and added it to the wiki as a recipe: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/HashProperty It doesn't depend on anything in SQLAlchemy and works with any object persistence framework. It could probably use some better null handling and error reporting, but should be usable as is. Ants --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Infinite recursion trying to deserialize any restriction
that was a bug, fixed in 5802. On Feb 17, 2009, at 5:48 AM, Joril wrote: 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) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30
Hi all, I wonder what this message mean: TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30 any ideas? jo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Auto-loading With Relationships
We have sets of databases with several hundred tables per database. Most of these tables are linked using various foreign key relationships. Is there any sort of automatic SQL Alchemy generation? Either SQL Soup like loading or a script that gets run once that generates code for use. -Gp --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Auto-loading With Relationships
Hi, On Tue, Feb 17, 2009 at 2:50 PM, Gp gpm...@gmail.com wrote: We have sets of databases with several hundred tables per database. Most of these tables are linked using various foreign key relationships. Is there any sort of automatic SQL Alchemy generation? Either SQL Soup like loading or a script that gets run once that generates code for use. - There's this: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Specifying descending order_by on a backref
I'm using the declarative extension. When I specify a backref on a relation, I see the order_by argument and I'm pointing it to the column object. That works, but I need to sort the backref descendingly, not ascendingly. I don't see an option for that in the Relation()/backref() arguments. What am I missing? Thanks ahead of time. -Ken --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Specifying descending order_by on a backref
On Tue, Feb 17, 2009 at 5:03 PM, Ken kkin...@gmail.com wrote: I'm using the declarative extension. When I specify a backref on a relation, I see the order_by argument and I'm pointing it to the column object. That works, but I need to sort the backref descendingly, not ascendingly. I don't see an option for that in the Relation()/backref() arguments. What am I missing? backref supports the same arguments as relation(), which include an order_by argument. http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html?highlight=backref#sqlalchemy.orm.relation -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Specifying descending order_by on a backref
On Feb 17, 3:13 pm, Michael Trier mtr...@gmail.com wrote: backref supports the same arguments as relation(), which include an order_by argument. http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html?highligh... Michael, I'm using the order_by argument. The problem is that it's sorting my values ascendingly instead of descendingly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Specifying descending order_by on a backref
Hi, On Tue, Feb 17, 2009 at 5:22 PM, Ken kkin...@gmail.com wrote: On Feb 17, 3:13 pm, Michael Trier mtr...@gmail.com wrote: backref supports the same arguments as relation(), which include an order_by argument. http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html?highligh... Michael, I'm using the order_by argument. The problem is that it's sorting my values ascendingly instead of descendingly. Sorry, I misunderstood. You should be able to do a order_by=field.desc(). -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Specifying descending order_by on a backref
On Feb 17, 3:29 pm, Michael Trier mtr...@gmail.com wrote: Sorry, I misunderstood. You should be able to do a order_by=field.desc(). Ah, that answers my question. Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Auto-loading With Relationships
According to Autocode's readme it doesn't support relationships. The major reason that Soup won't work for me is it doesn't support relationships between tables. I'm still going to take a closer look at Autocode. Thanks for the suggestion. -Paul On Feb 17, 4:09 pm, Michael Trier mtr...@gmail.com wrote: Hi, On Tue, Feb 17, 2009 at 2:50 PM, Gp gpm...@gmail.com wrote: We have sets of databases with several hundred tables per database. Most of these tables are linked using various foreign key relationships. Is there any sort of automatic SQL Alchemy generation? Either SQL Soup like loading or a script that gets run once that generates code for use. - There's this:http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode -- Michael Trierhttp://blog.michaeltrier.com/http://thisweekindjango.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---