I am working on my localization stuff and run into a problem when I want
to add an relationship to a class.
I based my code on
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Views , but maybe I
messed something up.
The following works:
r1 = session.query(db.Region_LV).get(175)
print
For a deferred() itself, we don't have an option that does this.Though this
is an unusual request. If you definitely want the deferreds to load, what's
the issue having them render inline into the original query ?The advantage
to subqueryload is primarily in that it loads multiple
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',
primaryjoin=Country_LV.fk_language_id==Language.id,
foreign_keys=[Country_LV.__table__.c.fk_language_id])
I get:
sqlalchemy.exc.ArgumentError: Column-based
Michael,
On 09/07/2011 05:10 PM, Michael Bayer wrote:
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',
primaryjoin=Country_LV.fk_language_id==Language.id,
foreign_keys=[Country_LV.__table__.c.fk_language_id])
On Sep 7, 2011, at 11:53 AM, werner wrote:
Michael,
On 09/07/2011 05:10 PM, Michael Bayer wrote:
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',
primaryjoin=Country_LV.fk_language_id==Language.id,
The following gives CircularDependencyError
where I think there isn't, but you know I don't know that much the internals
of SQLAlchemy and maybe (and it is a strong possibility) I'm wrong. I've
ripped of the classes causing the error (copy/paste will re-produce the
error).
from sqlalchemy import
On Sep 7, 2011, at 12:36 PM, Erkan Özgür Yılmaz wrote:
The following gives CircularDependencyError
where I think there isn't, but you know I don't know that much the internals
of SQLAlchemy and maybe (and it is a strong possibility) I'm wrong. I've
ripped of the classes causing the error
Oh, that worked very well, thank you very much...
E.Ozgur Yilmaz
Lead Technical Director
eoyilmaz.blogspot.com
On Wed, Sep 7, 2011 at 8:04 PM, Michael Bayer mike...@zzzcomputing.comwrote:
On Sep 7, 2011, at 12:36 PM, Erkan Özgür Yılmaz wrote:
The following gives CircularDependencyError
I forgot to say thank you, I've solved it as you suggested and created a
TaskableEntity for task related entities...
E.Ozgur Yilmaz
Lead Technical Director
eoyilmaz.blogspot.com
On Sun, Sep 4, 2011 at 11:35 PM, Michael Bayer mike...@zzzcomputing.comwrote:
TaskMixin.tasks places a
On 09/07/2011 05:58 PM, Michael Bayer wrote:
On Sep 7, 2011, at 11:53 AM, werner wrote:
Michael,
On 09/07/2011 05:10 PM, Michael Bayer wrote:
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',
What is the right way to use .order_by() to order by the values returned
by a model object property? My model object is like this:
class Project(DeclarativeBase):
__tablename__ = 'project'
id = Column(Integer, primary_key=True)
...
@property
def remainderDue(self):
You'd use a hybrid for this case, and due to the usage of float() you'd
probably want to produce a separate @expression that doesn't rely on a Python
function.
Docs and examples for hybrid are at
http://www.sqlalchemy.org/docs/orm/extensions/hybrid.html
Separate @expression:
Still getting the hang of SQLAlchemy terminology.
I didn't mean a simple deferred() column, but a deferred column_property()
which defines a scalar select(). Like in the example here
http://www.sqlalchemy.org/docs/orm/mapper_config.html#sql-expressions-as-mapped-attributes
.
My goal is to,
On Sep 7, 2011, at 5:09 PM, Sumeet Agarwal wrote:
Still getting the hang of SQLAlchemy terminology.
I didn't mean a simple deferred() column, but a deferred column_property()
which defines a scalar select(). Like in the example here
Great, thanks!
.oO V Oo.
On 09/06/2011 04:48 PM, Michael Bayer wrote:
On Sep 6, 2011, at 10:40 AM, Vlad K. wrote:
I have a products database which is daily syncronized with an external source
via a csv file. There are several thousand rows in question. The
synchronization does two
Using SQLAlchemy 0.7.2 with pyodbc 2.1.9, FreeTDS 0.91, unixODBC 2.3.0
and SQL Server 2008 I find that the supports_unicode_bind may be
incorrectly set to False in the PyODBCConnector.initialize. As a
result a unicode parameter gets encoded as str and to make matters
worse the value gets silently
I can't actually make that string work at all with FreeTDS, but I am on 0.82.
If I turn on Python unicodes with FreeTDS 0.82, which until recently was the
FreeTDS release for years, everything breaks immediately - the CREATE TABLE
statements won't even work, as you can see below just the
The ticket for SQLAlchemy is:
http://www.sqlalchemy.org/trac/ticket/2273
For Pyodbc I've opened:
http://code.google.com/p/pyodbc/issues/detail?id=209
http://code.google.com/p/pyodbc/issues/detail?id=210
as you can see, issue 210 is quite serious.Would be curious what results
you get for
18 matches
Mail list logo