I am quite baffled by the "deferred loading" behavior on a class
member in the following code (see below). Looks like if I create an
object (t1) with some field (c2) having None as value, then after I
save, commit, and closed the object in a SQLAlchemy session, I cannot
update the c2 field. It wil
On Thu, 2007-01-11 at 15:13 -0400, Michael Bayer wrote:
> for now, Resource.query.filter(resource_table.c.somecol.op('rlike')
> ()) will work.
Thanks. Going through the SA0.4 tutorial, it seems this would be easier
if I abandon rlike and just go with like, which ( thinking about it )
will be jus
On Nov 1, 2007, at 6:41 PM, Mike Orr wrote:
>
> I have two tables Incident and Entry with a 1:many relationship.
> Incident.orr_id is a primary key. Entry.entry_id is a primary key,
> and Entry.orr_id is a foreign key. (The column names are a legacy
> tradition.) I have the following model an
Autoloading and foreign key detection are problematic on some DB engines (I
think SQlite falls in this category as it doesn't directly support FKs), on
other engines they are simply hard to detect.
I would think that your override of the FK in the t_incident table should be
all that's needed to pi
I have two tables Incident and Entry with a 1:many relationship.
Incident.orr_id is a primary key. Entry.entry_id is a primary key,
and Entry.orr_id is a foreign key. (The column names are a legacy
tradition.) I have the following model and classes:
t_incident = Table("Incident", meta,
aut
for now, Resource.query.filter(resource_table.c.somecol.op('rlike')
()) will work.
On Nov 1, 2007, at 2:12 PM, iain duncan wrote:
>
> Others gave some pointers a while back on using rlike with query
> filters. I'm wondering whether there is some way to get rlike with
> assign_mapper syntax?
>
To do this nicely ticket #767 would have to be fixed, but until then
this should work:
def rlike_match_all(entity, **kwargs):
return and_(*[getattr(entity,
key).comparator.expression_element().op('rlike')(value) for key,value
in kwargs.items()])
and use it by
Resource.select(rlike_match_all(R
I think I misunderstood the use of the association proxy -- I don't
think I want to use it in this case anymore...
thx
m
On Oct 31, 6:33 pm, Matt <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a table (Content) which relates to itself via a many-to-many
> relationship through a link table (Con
On Nov 1, 2007, at 12:41 PM, Lukasz Szybalski wrote:
>
> Hello,
> Does assign_mapper have any order_by function available to him after
> the object has been mapped?
>
> model.py -
> myclass_table = sqlalchemy.Table('myClass', metadata, autoload=True)
>
> class myClass(object):
> pass
>
>
Others gave some pointers a while back on using rlike with query
filters. I'm wondering whether there is some way to get rlike with
assign_mapper syntax?
I'm using right now
Resource.select_by( **query_dict )
where query dict is name/val pairs, I'd like to be able to make those
name/val pairs b
Hello,
Does assign_mapper have any order_by function available to him after
the object has been mapped?
model.py -
myclass_table = sqlalchemy.Table('myClass', metadata, autoload=True)
class myClass(object):
pass
myclassmapper=assign_mapper(session.context,myClass,myclass_table)
control
sorry, i havent been following. two++ dicts ?! this is getting out
of hand. if we have to have any dicts at all, it would be just one
dict. and also, it should be proxied through a property so that if
you dont access it, its never even created. we have this on
ConnectionFairy right n
1st step would be to ensure youre on the latest version of sqlite.
second step would be to create a test program illustrating the
behavior using pysqlite only (sqlalchemy doesn't have anything to do
with sqlite lock timeout issues). if you can confirm that the
timeout isnt working in tha
That sounds reasonable to me; my knee-jerk thought was that we might need to
worry about memory usage, but these references are only on low-count
instances like tables, columns, sessions and mappers, not ORM object
instances.
On 10/31/07, Paul Johnston <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Ah s
I posted this message in the pylons group but as of yet have received
no response.
http://groups.google.com/group/pylons-discuss/browse_frm/thread/093ec04b48e49c3c?hl=en#
I've been looking into this problem a little more. From my reading of
the SQLite documentation there should be a 5 second tim
15 matches
Mail list logo