Using the second example in
http://www.sqlalchemy.org/docs/orm/mapper_config.html#mapping-a-class-against-multiple-tables,
how should I define relationship properties KeywordUser.keyword and
KeywordUser.user? I tried different primaryjoin's, but when used as
filter, e.g.
Hi.
Imagine the following scenario:
session = DBSession()
readonly_model = session.query(ReadOnlyModel).get(id)
# Readonly means the model will NOT have its data changed in the life of
the transaction(s).
method_one(readonly_model.readonly_data, param_1, param_2, ...)
On Nov 13, 2011, at 7:59 AM, Vlad K. wrote:
Hi.
Imagine the following scenario:
session = DBSession()
readonly_model = session.query(ReadOnlyModel).get(id)
# Readonly means the model will NOT have its data changed in the life of the
transaction(s).
Hi, thanks for your reply.
On 11/13/2011 05:15 PM, Michael Bayer wrote:
From what I've read in the docs, I am supposed to do session.refresh(),
No that's not required at all. All the objects that are still referenced
outside the session, stay present in the session and will reload
Thanks a lot, Michael!
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sqlalchemy/-/Vc5LM46bOiUJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To
On Nov 13, 2011, at 11:52 AM, Vlad K. wrote:
Hi, thanks for your reply.
On 11/13/2011 05:15 PM, Michael Bayer wrote:
From what I've read in the docs, I am supposed to do session.refresh(),
No that's not required at all. All the objects that are still referenced
outside the
On 11/13/2011 06:16 PM, Michael Bayer wrote:
But they're not, I'm getting Instance XY is not present in this
Session, for readonly_model when method_two is called, if there was a
rollback in method_one.
That would indicate you add()-ed it during the transaction. Any data
that was created
On Nov 13, 2011, at 12:51 PM, Vlad K. wrote:
I suppose it interacts with
http://pypi.python.org/pypi/zope.sqlalchemy
oh duh yes I can't keep it straight.
Vlad
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this
Hello,
I'm trying to get the name of the columns of my tables, writing
columnDb = self.table.__table__.columns._all_cols
self.labels = [col.name for col in columnDb]
ColumnDb is a Set Type... and it usually returns all the columns in
the same order defined in the table...but not always.
On Nov 13, 2011, at 8:29 PM, Hanss wrote:
Hello,
I'm trying to get the name of the columns of my tables, writing
columnDb = self.table.__table__.columns._all_cols
self.labels = [col.name for col in columnDb]
ColumnDb is a Set Type... and it usually returns all the columns in
Here are few columns that I am not sure how to represent their data in
the database.
Columns like 'status' in account indicating the account status.
Columns like 'type' indicating the account type 'business',
individual', 'reseller'.
Granted I can normalize them and create tables for each. but
On Nov 13, 2011, at 11:51 PM, espresso maker wrote:
Here are few columns that I am not sure how to represent their data in
the database.
Columns like 'status' in account indicating the account status.
Columns like 'type' indicating the account type 'business',
individual', 'reseller'.
On 14 Nov, 03:19, Michael Bayer mike...@zzzcomputing.com wrote:
When using Declarative, the order ultimately comes from the order in which
each Column object was generated, which drives the order in which Declarative
adds them to the Table which is then what you get when you iterate over
Thanks this is exactly what I was looking for! :)
On Nov 13, 9:25 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Nov 13, 2011, at 11:51 PM, espresso maker wrote:
Here are few columns that I am not sure how to represent their data in
the database.
Columns like 'status' in
14 matches
Mail list logo