I used weak ref dict and doing a session.clear() post every request. But
when I do a len(gc.get_objects()) post every request I can see that the
number of objects keeps on increasing. Do we have a background thread that
frees up the unused objects in SA after a while?
On Dec 7, 2007 3:49 AM, Micha
On Dec 6, 2007, at 4:58 PM, Felix Schwarz wrote:
>
> Michael Bayer schrieb:
>> in version 0.4, the session is weak referencing so that objects
>> which are not elsewhere referenced (and also are not marked as
>> dirty or deleted) fall out of scope automatically. that is
>> documented at
Michael Bayer schrieb:
in version 0.4, the session is weak referencing so that objects which
are not elsewhere referenced (and also are not marked as dirty or
deleted) fall out of scope automatically. that is documented at:
> http://www.sqlalchemy.org/docs/04/session.html#unitofwork_using
I have DB with one master server and several replicated slaves
(MySQL). How to implement this functionality: read-only request can be
passed to any DB (master or slave), but any write request with
following read requests must be sended to master only (to avoid
synchronization lag).
--~--~-
heya -
Remove the children from the collection, set the new children onto it,
and then flush; they'll be deleted. you can just say parent.children
= [newobj1, newobj2, newobj3]. the removed children get deleted and
the new children get added.
session.delete(obj) does not change the status of a
I am using exactly that configuration. However, I wish to delete just
the children objects and I have been
unable to do session.delete(o);session.flush(); o.kids = ... "
session.save(o)
which I expected to remove the object o and all the kids, then re-
insert o with the new kids.
On Dec 6, 10:43
Hi Paul,
On 6 déc, 19:31, Paul Johnston <[EMAIL PROTECTED]> wrote:
> Hi,
>
> >It seems that the mssql backend use a 'foreign_key' attribute on
> >Column which does not exist anymore.
>
> Yes, it's now foreign_keys. This is fixed in the svn trunk.
Thanks !
> I still need to sort out a way to ha
i would think a regular cascade="all, delete-orphan" configuration
would make this quite simple.
http://www.sqlalchemy.org/docs/04/session.html#unitofwork_cascades
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
> I still need to sort out a way to have MSSQL unit test periodically
I'm still planning on hosting a buildbot as I promised some months (how
embarassing) ago. The first one will be Linux + pymssql, but once I get the
new VMware host provisioned out here, I can put up a Windows + pyodbc host
too.
column.foreign_key is now a list: foreign_keys[]. Trunk looks correct and
should work. Works here.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@go
Hi,
>It seems that the mssql backend use a 'foreign_key' attribute on
>Column which does not exist anymore.
>
>
Yes, it's now foreign_keys. This is fixed in the svn trunk.
I still need to sort out a way to have MSSQL unit tests run
periodically, so we can pick up this kind of issue before rel
Hi all,
Since SQLAlchemy 0.4.1, I cannot create my database anymore on mssql
only (mysql and sqlite are fine).
The error is the following :
File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.1-py2.4.egg/
sqlalchemy/databases/mssql.py", line 945, in get_column_specification
if (not getat
That's what I am looking for, since the ORM is able to
find all the children of a deleted object, I thought I might use
the same functionality to find all the children on the object
and delete them directly.
On Dec 6, 2:55 am, svilen <[EMAIL PROTECTED]> wrote:
> On Wednesday 05 December 2007 23:
> > Hi.
> > I know that I can do SQL UNION of two record sets when using SQL
> > Expression objects. But how to do UNION of two sqlalchemy.orm.Query
> > objects? I can do the UNION on SQL Expressions level and then use
> > 'from_statement' from Query, but what I can do if I already have two
> > Qu
Hi,
>My problem is beeing able to represent and store relations between
>"options" and "contents" tables in a normalized way.
>
>
I'd probably just store the relationship as a string. Do you have any
particular querying requirements? Sometimes pragmatism beats elegance.
Paul
--~--~-
On Dec 6, 2007, at 11:41 AM, Artur Siekielski wrote:
>
> Hi.
> I know that I can do SQL UNION of two record sets when using SQL
> Expression objects. But how to do UNION of two sqlalchemy.orm.Query
> objects? I can do the UNION on SQL Expressions level and then use
> 'from_statement' from Query,
On Dec 6, 2007, at 8:57 AM, imgrey wrote:
>
>> i can only make comments about fragments like this but i cant address
>> your full design issue since you havent supplied a fully working
>> illustration of what it is youre trying to do.
>
>
> the daemon: http://dpaste.com/hold/27089/
> and require
Hi.
I know that I can do SQL UNION of two record sets when using SQL
Expression objects. But how to do UNION of two sqlalchemy.orm.Query
objects? I can do the UNION on SQL Expressions level and then use
'from_statement' from Query, but what I can do if I already have two
Queries?
--~--~-~
eh, i use surrogate keys all the time :)
On Dec 6, 2007, at 4:45 AM, paftek wrote:
>
> Thanks for these interesting articles.
>
> I was blind ! Why using a small integer surrogate primary key instead
> of two chars primary key, why ? =)
> As described in the article, I think I am abusing of surr
If I recall, your application is using localthread strategy and
scoped_session(), doesn't it? Doesn't scoped_session() collect references
from otherwise transient Session()'s and hold on to them between calls?
--~--~-~--~~~---~--~~
You received this message because
In my application i am creating a new session for each request and getting
rid off the session (it goes out of scope) before sending the response back
to the client. So does that means that the session object is still holds
onto objects even though it goes out of scope and eligible for getting
GC'e
Thanks for these interesting articles.
I was blind ! Why using a small integer surrogate primary key instead
of two chars primary key, why ? =)
As described in the article, I think I am abusing of surrogate primary
keys. Our database schema is not yet finalized, I am going to fix this
right now.
the session in 0.3 holds onto objects until they are explicitly
removed using session.clear() or session.expunge().
as a super quick fix you can use the "weak_identity_map" flag with the
0.3 session which will change the identity map to be weak
referencing. however, objects which are marke
> i can only make comments about fragments like this but i cant address
> your full design issue since you havent supplied a fully working
> illustration of what it is youre trying to do.
the daemon: http://dpaste.com/hold/27089/
and required utils.py modele: http://dpaste.com/hold/27092/
i
FYI: I am using SA 0.3.9.
On Dec 6, 2007 6:52 PM, Arun Kumar PG <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am having this problem with memory consumption when using SA. I have 200
> MB ram allocated for the application and when I look at the usage statistics
> using top or any other memory monito
Hi All,
I am having this problem with memory consumption when using SA. I have 200
MB ram allocated for the application and when I look at the usage statistics
using top or any other memory monitor I see that after every request to the
application the memory consumption is increasing and the memor
On Wednesday 05 December 2007 23:36:12 kris wrote:
> with sqlalchemy 0.4.1,
>
> Is there an idiom for delete the children of the object
> without actually deleting the object itself?
>
> I tried
> session.delete (obj)
> session.flush()
> # add new children
> session.save (obj)
> session.flush()
>
27 matches
Mail list logo