I noticed that the target objects passed in SA event are stripped off
relationship columns.
E.g., relationship column Post.user --
class User(Base):
__tablename__ = 'users'
user_id = Column(Unicode(32), primary_key=True)
user_name = Column(Unicode(32))
...
class Post(Base):
Documentation for AttributeImpl.callable_ still reads
optional function which generates a callable based on a parent
instance, which produces the default values for a scalar or
collection attribute when it's first accessed, if not present
already.
But it seems it
In the example included in the 0.7 documentation, I can't figure out how
the code backref=left_nodes works ?
Notably, because I can't find a reference to left_nodes...
from sqlalchemy import Integer, ForeignKey, String, Column, Tablefrom
sqlalchemy.ext.declarative import declarative_basefrom
On Dec 26, 2011, at 7:34 AM, jerryji wrote:
I noticed that the target objects passed in SA event are stripped off
relationship columns.
E.g., relationship column Post.user --
class User(Base):
__tablename__ = 'users'
user_id = Column(Unicode(32), primary_key=True)
user_name
On Dec 26, 2011, at 9:07 AM, Kent wrote:
Documentation for AttributeImpl.callable_ still reads
optional function which generates a callable based on a parent
instance, which produces the default values for a scalar or
collection attribute when it's first accessed, if
On Dec 26, 2011, at 9:56 AM, k.elkouhen wrote:
In the example included in the 0.7 documentation, I can't figure out how the
code backref=left_nodes works ?
Notably, because I can't find a reference to left_nodes...
left_nodes and right_nodes are essentially equivalent collections:
n1,
Yes, a nice simplification.
I'm using it to lazyload attributes for objects that aren't in a
session. I'm not sure if you pointed me there, I think I found it
myself, but you helped work out the later details...
Our app lives inside a webserver framework that, very appropriately,
in my opinion,
think I'll put:
state.session_id = None
in a finally block, but you get the idea
On Dec 26, 1:50 pm, Kent jkentbo...@gmail.com wrote:
Yes, a nice simplification.
I'm using it to lazyload attributes for objects that aren't in a
session. I'm not sure if you pointed me there, I think I found it
hi michael,
thank you very much for your response. i have read the beaker cache
examples but i am yet to grasp it. the current solution i have found
is querying the relationships as well with the joinedload() and
caching the result.
after i fully understand what is going on and how to do it