Hello everyone!
I'm trying to migrate from SqlAlchemy 0.6.8 to 0.7.4.
I have a class that is the base for all the bases in my system. In
that class is where I define the id (numeric primary key) for the rest
of my classes. That class is not mapped to any table.
I want to have getter/setter for
After setting expire_on_commit to False, I hit inconsistency after
commits in DB relations.
For example, I've two tables Host and HostPort, where Host have a
relation to Ports:
class HostPort(Base):
__tablename__ = 'hostport'
db_id = Column('id', Integer, primary_key=True) # the port's id
2011/12/11 Michael Bayer mike...@zzzcomputing.com
My impression was Postgresql handles this much more nicely which is
confirmed by this post:
http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/
the usual way this kind of thing is done is via declaring local variables
in the SQL
On Dec 11, 2011, at 5:56 AM, Hector Blanco wrote:
but if then i try to use the id in filters (such as
Product.manufacturer.any(id=parameterId), where Product is a really
mapped class, with a relationship towards Manufacturer, another
really mapped class, ) I get a key error id,
so it looks
On Dec 11, 2011, at 8:35 AM, Amir Sasson wrote:
After setting expire_on_commit to False, I hit inconsistency after
commits in DB relations.
For example, I've two tables Host and HostPort, where Host have a
relation to Ports:
class HostPort(Base):
__tablename__ = 'hostport'
db_id =
/sqlalchemy/sql/expression.py:1869: SAWarning: The IN-predicate on
comment.reply_id was invoked with an empty sequence. This results in
a contradiction, which nonetheless can be expensive to evaluate.
Consider alternative strategies for improved performance.
return self._in_impl(operators.in_op,
On Dec 11, 2011, at 11:55 AM, lestat wrote:
/sqlalchemy/sql/expression.py:1869: SAWarning: The IN-predicate on
comment.reply_id was invoked with an empty sequence. This results in
a contradiction, which nonetheless can be expensive to evaluate.
Consider alternative strategies for improved
On Dec 11, 2011, at 1:06 PM, Michael Bayer wrote:
In the above case, you'd just say comments_replies = [].
correction, as you're attempting to return a Query; you'd factor the calling
code to expect that an empty list of user_ids as input should result in an
empty result that can't be
I need EmptyQuery because query that returns from my function used for
different cases,
and if I return [], it will raise error, because [] not has query methods
like order_by.
e.g.
query1 = getComments(user_id).order_by('comment.time_create desc')
query2 = getComments(user_id).order_by('id')
The workaround is very simple, just say A.id==5 instead of id=5. The
bug itself is fixed in r99564ce1414c.
Ah, yeah! That works! I find using the double == for comparison
clearer (just a personal opinion)
--
You received this message because you are subscribed to the Google Groups
Oh, it wasn't exactly an error with the Synonyms itself. They are
working fine for what I've been doing with them (just using them for
getters/setters... nothing fancy) It was more that when I migrated the
Synonyms I have in the 0.6.8 to hybrid_properties in 0.7.4, I was
getting trouble (which I'm
Hello everyone!
I am continuing with the migration from SqlAlchemy 0.6.8 to 0.7.4, and
I've seen a little difference in behavior.
I have a class Product (more or less) like:
class Product(declarativeBase):
_id = Column(id, Integer, primary_key=True)
_model = Column(model,
On Dec 11, 2011, at 3:54 PM, Hector Blanco wrote:
Hello everyone!
I am continuing with the migration from SqlAlchemy 0.6.8 to 0.7.4, and
I've seen a little difference in behavior.
I have a class Product (more or less) like:
class Product(declarativeBase):
_id = Column(id,
hi,
I would like to build a reusabe forum application. For the sake of
simplicity we need two tables Owner and Thread. There is a ForeignKey from
Thread to Owner. As reusability goes, the Owner table is given in a
configuration argument, thus it's unknown when the code is written.
Using pyramid,
Kinda lame I could not find that I should have known
Thanks!
On Dec 9, 2011, at 16:01 , Michael Bayer wrote:
On Dec 9, 2011, at 5:28 AM, Martijn Moeling wrote:
Hi,
I'm puzzled on how to get this working:
class User(base):
Id = Column (Integer,
15 matches
Mail list logo