Great,
I'll check out the latest revision. There was another issue that I ran
into a couple hours ago. That is, if you turn database echo on for the
test2 example you can see that every time you make a call like
Test.get(1) or Test.get(2) the object is reloaded from the database. I
believe that
On 3/25/06, Jonathan Hayward http://JonathansCorner.com [EMAIL PROTECTED]
wrote:A few questions:1: How do I specify a string of indeterminate length in the pseudocode
at the bottom of this list? It will be a usability bug if I setarbitrary limits on how long things can be?Just don't specify a
Seemingly SA is fairly liberal with interpreting my wish to get stuff from the
database.
So what's the pattern to deal with session caching?
I hear there's expunge etc. now, and expire, but that's all when I know what
objects I want to have removed/expired/refreshed. Fact is, I don't, I wouldn't
On 3/26/06, Jonathan Ellis [EMAIL PROTECTED] wrote:
On 3/25/06, Jonathan Hayward http://JonathansCorner.com
[EMAIL PROTECTED]
wrote:
A few questions:1: How do I specify a string of indeterminate length in the pseudocode
at the bottom of this list? It will be a usability bug if I setarbitrary
When I make a selection with a mapper I get back an instance object. Same goes for the mapper's relations.Is there any way to make SQLAlchemy returning standard list objects?Example:orders = list()print type(orders) #type 'list'orders = Order.mapper.select(limit=3)print type(orders)print
I realize that this is up to Ian, and I know he has some problems with
certain aspects of SA architecture, but doesn't it make sense for there
to be a SO compatibility layer to SA, rather then continuing a
completely separate SO? This, since it seems SO performs a subset of
what SA is capable
im not a huge fan of cascade_mapper for reasons like this.
since you have an ambiguous join, perhaps youre looking for explicit
join conditions ?
http://www.sqlalchemy.org/docs/
adv_datamapping.myt#adv_datamapping_relations_customjoin
On Mar 26, 2006, at 1:05 PM, Gambit wrote:
Hi guys
theres no caching in SQLAlchemy. theres an identity map which has
some of the same effects as a cache. basically, if you have already
loaded your object into the current session, thats it. if you load
it again, its going to use the same one you have, unless you clear
the session, or
well other folks have been asking that it return a generator object which dynamically executes the query at the moment you ask for a slice of it.you can always go with orders = list(Order.mapper.select(limit=3)) to assure the type.any particular reason "list" is so important ? whats python
I put into the wiki's recipe section a working version of all this,
for those who are interested.
Incidentally -- I know the join's ambiguous, but while we're guessing
with cascade_mapper (that is, if it's going to be used as a feature),
we might as well guess intelligently. Does the current
So how do you scale/split your application across multiple data accessing
servers (short of writing an application server)?
Calling objectstore.clear() everywhere?
Quoting Michael Bayer [EMAIL PROTECTED]:
theres no caching in SQLAlchemy. theres an identity map which has
some of the same
On Mar 26, 2006, at 3:48 PM, Koen Bok wrote:
Does indeed work, but orders[1].products is still an instance
object. Is there a way to convert all of the relation results to
lists?
not really, since a plain list cannot track changes you have made to
that list, and a plain list also does
Ha! objectstore.commit() was where I all did it for!
I will stick to the plan figuring how PyObjC decides what a list is.
Then I will someway let it decide the mapper results are also lists.
Thanks for your quick replies!
Koen
On 26-mrt-2006, at 23:02, Michael Bayer wrote:
On Mar 26,
I am using 3.2 Kinterbasdb with latest svn sqlalchemy.
I've defined tables using autoload, but primary_key = False in all the tables
loaded.
Also it doesn't seem to create foreign keys either.
Anyone know if this is supposed to work with firebird?
--
Brad Clements,[EMAIL
firebird doesnt work at all right now AFAIK...if it actually did some
things correctly, thats great news. the creator/maintainer of the
module has been on vacation until this week, and has not yet gotten
around to the initial testing of the module which I committed into
SVN for him a few
this patch will cause the mapper to reload all the properties in
identity-mapped objects every time a SELECT statement comes across
it, blowing away any changes that might have been made to the object
in memory. it maintains the unique per-session identity map of
instances:
Index:
On Mar 26, 2006, at 5:56 PM, Florian Boesch wrote:
And yes, I'm also *SICK* of putting up with an endless stream of
bugs that keep
creeping up and slowing me down.
SA was only released as an SVN checkout in November. its going to
have a lot of bugs for many months. not like ive been
and anyway, SVN changeset 1216 :
m = mapper(class, table, always_refresh=True)
anytime that mapper pulls an already-loaded object from the identity
map when traversing a rowset, it will overwrite the object's
properties with the rowset's data. will blow away any changes on
that
It seems that this problem is giving me more trouble than I originally
thought. If I create a many-to-many relation between the baseclass Test
and some other class Foo to get the attribute foos, then it doesn't
work with Test1 and Test2 instances. a = Test1(); a.foos.append(Foo());
On 3/26/06, Florian Boesch [EMAIL PROTECTED] wrote:
So how do you scale/split your application across multiple data accessingservers (short of writing an application server)?What problems does an identity map pose to multiple client processes?
I'm confused because you seem to imply that if you
I'm really suspicious of this because the other ORM whose design I really admire, the Java SimpleORM, also has an identity map with no way to turn it off, and its author has put a hell of a lot of thought into it. FWIW.
On 3/26/06, Michael Bayer [EMAIL PROTECTED] wrote:
this patch will cause the
Oh, i would never recommend turning off the identity mapthe second patch below is more for educational means, which is why I say its "definitely worth trying" - I was amazed at how fast things started to break down when i tried it. having the mapper re-fetch the attributes on every select
22 matches
Mail list logo