My *model* is like this:
__init__.py:
from projects.model.auth import User
from projects.model.main import Company
auth.py:
class User(DeclarativeBase):
company_id = Column('company_id', Integer, ForeignKey('company.id'))
# many-to-one
main.py:
class Company(DeclarativeBase):
id =
On 01/25/2012 01:57 PM, Tim Black wrote:
My *model* is like this:
__init__.py:
from projects.model.auth import User
from projects.model.main import Company
auth.py:
class User(DeclarativeBase):
company_id = Column('company_id', Integer,
ForeignKey('company.id')) # many-to-one
-distinct-from-attribute-behavior
The float() call in SQL would likely be using CAST, so take a look at
http://www.sqlalchemy.org/docs/core/expression_api.html?highlight=cast#sqlalchemy.sql.expression.cast
for that.
On Sep 7, 2011, at 2:27 PM, Tim Black wrote:
What is the right way to use
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):
the mappings.
On Aug 13, 2011, at 4:01 PM, Tim Black wrote:
I'm getting the following error message running TurboGears 2.1.1 and
SQLAlchemy 0.7.2, using TurboGears' multiple database setup described
here: http://turbogears.org/2.1/docs/main/MultipleDatabases.html.
Both databases are SQLite3
will be used for all classes, mappers, and tables except where another
engine is specified by binds. For brevity's sake, I note that 1. is
implicit in 2.
Tim
On Aug 17, 2011, at 12:03 PM, Tim Black wrote:
Michael,
Thank you for your advice. It took me a while to figure out how to
follow
On 08/17/2011 02:05 PM, Michael Bayer wrote:
On Aug 17, 2011, at 1:06 PM, Tim Black wrote:
But here is how the docs could be made more clear - simply state 1.
whether it is allowable to use bind and binds simultaneously on the
same object, and (if 2. is the case) 2. that the engine specified
On 08/17/2011 03:30 PM, Tim Black wrote:
On 08/17/2011 02:05 PM, Michael Bayer wrote:
On Aug 17, 2011, at 1:06 PM, Tim Black wrote:
But here is how the docs could be made more clear - simply state 1.
whether it is allowable to use bind and binds simultaneously on the
same object, and (if 2
I'm getting the following error message running TurboGears 2.1.1 and
SQLAlchemy 0.7.2, using TurboGears' multiple database setup described
here: http://turbogears.org/2.1/docs/main/MultipleDatabases.html. Both
databases are SQLite3 databases; one is the main database for the
TurboGears app; the
I'm not sure to what extent it works at present, but someone ported
OpenERP server to work with SQLAlchemy:
http://openerp-team.blogspot.com/2009/08/open-erp-server-with-mysql.html
And some parts of OpenERP look like they use SQLAlchemy:
10 matches
Mail list logo