Hi iain
On 2/5/07, iain duncan [EMAIL PROTECTED] wrote:
Below is my code in case someone has time to look at it. At the moment it
works to get
article.ordering as a list instead of one field. Is there a way to tell it
that this is only supposed to be one item?
uselist is your friend.. :)
Rick Morrison wrote:
I keep two versions of SA installed here, one is a stable
version installed in the Python site-packages folder, and one
is current trunk with some local patches for testing.
I used to be able to run tests and programs using the local
version by just inserting the
Michael Bayer wrote:
I added distinct() to selectresults as a method and made the
unit test a little clearer (since i dont like relying on the
selectresults mod)...
q = sess.query(Department)
d = SelectResults(q)
d =
When I run the testsuite more than once, results are differents.
This strange behavior disappear when the the testsuite is launched
with python in optimize mode 'python -OO alltest.py'
This is particularly true with orm.inheritance5.
Very very strange and very blocking since we can't guarantee
I'm working inside TurboGears, autoload everything.
Tested with 0.3.3 and Trunk.
I find this strange behaviour: when I declare a relation between a
Person and a Contract:
assign_mapper(context, Contract, tbl['contracts'], properties = {
'responsible' : relation(Person,
Marco Mariani wrote:
john.contracts_responsible
gives me
AttributeError: 'Person' object has no attribute 'contracts_responsabile'
this is a cut-n-translate-n-paste typo, should read
contracts_responsible of course
--~--~-~--~~~---~--~~
You received
How to py2exe it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
If you put a refresh just before your assert, that is working:
...
user = session.query(User).selectone_by(name='user1')
session.refresh(user)# here !
assert user.post_count==2, 'user.post_count is %s'%user.post_count
Not sure to understand why though... I bet its because of SA's cache
sureim not super thrilled with this whole issue since id rather
__init__ is just left alone, but the whole auto-add-to-the-session
behavior is pretty popular...so just submit a ticket/patch for
whatever version you want there.
On Feb 6, 7:29 am, Patrick Lewis [EMAIL PROTECTED] wrote:
On Feb
Hello,
Something Special said the following on 06.02.2007 18:07:
How to py2exe it?
1. Install SQLAlchemy with --always-unzip
2. Rename sqlalchemy's logging.py to log.py
3. Search/replace logging with log in all sqlalchemy's sources
except log.py itself
--
Oleg
yeah im not sure if i can fix that behavior, your call to
Person.c.uid is compiling the Person mapper before the Contract mapper
has been created. therefore when you call Person.get(), no mappers
compile and Contract remains uncompiled, and your
contracts_responsible attribute remains
i mentioned this dictionary-order on my ramblings some weeks ago; then
u didnt take it into account.
i've managed here to get repeatable testing and SQL generation with
hack-replacing many {} with ordered ones, but i don't like the
solution.
Why not just use util.Dict (defaulting to dict)
Hi,
I'm trying to get into SQLAlchemy and it has been really great so far,
but there are two things I can't figure out how to do:
(both are outside of ORM)
a) How do I do:
UPDATE sometable SET value = value * 0.9 + 1[ + optional WHERE
clause ] ?
I've tried experimenting with
as I have like 12 different SA directories which id like to jump
between without going through a distinct install for each one, im a
big fan of PYTHONPATH, and after futile-ly arguing with PJE that plain
libraries on PYTHONPATH should take precedence over installed
.eggs (he strongly feels that
On Feb 6, 1:13 pm, svilen [EMAIL PROTECTED] wrote:
i mentioned this dictionary-order on my ramblings some weeks ago; then
u didnt take it into account.
because i stop reading rambles after 50-60 words or so, and the stress
of glossing over the rest generally causes me to forget words 30-60 as
On Tue, 2007-06-02 at 06:25 -0200, Roger Demetrescu wrote:
Hi iain
On 2/5/07, iain duncan [EMAIL PROTECTED] wrote:
Below is my code in case someone has time to look at it. At the moment it
works to get
article.ordering as a list instead of one field. Is there a way to tell it
that
Michael Bayer wrote:
On Feb 6, 1:20 pm, S.R. Larmes [EMAIL PROTECTED] wrote:
a) How do I do:
UPDATE sometable SET value = value * 0.9 + 1[ + optional WHERE
clause ] ?
I've tried experimenting with .update(values=..) or stuff
like .execute(value=sometable.c.value*0.9+1) but it
Well one good thing about the positional-style INSERT is that it just
might be useful for implementing INSERT INTO SELECT FROM, which
would be a pretty useful addition to the SQL API layer
On 2/6/07, S.R. Larmes [EMAIL PROTECTED] wrote:
Michael Bayer wrote:
On Feb 6, 1:20 pm, S.R.
its all good, just not a high priority for me :). feel free to dig
in. the insert/update code is already a little intense due to it
already having multiple ways to do the same thing, not to mention its
some of the first code i wrote in SA and feels a little old, so adding
features like these
19 matches
Mail list logo