hello friends,
thank you very much for making and contributing to this great project.
i have a table with a multi-field primary key, one of which allows null.
when querying this table, i don't get the records with null in that field, even
if i'm specifically asking them in where.
but what
Hello,
when building a session extension with after_rollback or (after|before)
_commit logic one might want to find out whether the session that
triggered the extension by issuing a rollback or commit actually is an
outer session resp. actually issues/issued a COMMIT or ROLLBACK to the
database,
add allow_null_pks to your mapper arguments
See
http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
My apologies. I must have misunderstanding the behavior of
the schema option and thus its intent. How do I configure a
relation across two logical databases using schema?
I have tried the following:
engine = create_engine(DATABASEURI, echo=True)
meta = MetaData()
meta.bind = engine
left_schema
thanks a lot mike, it's working great now.
but this flag should be implied if one of the primary key fields is nullable
(especially since it's not nullable by default).
what would you think?
On Thu, Oct 15, 2009 at 14:28, Mike Conley mconl...@gmail.com wrote:
add allow_null_pks to your
Hi All,
I am having a very bad day (or two to be honest), spending time
reading error messages.
I am sorry to say but the SQLALCHEMY documentation is not very helpful
when using declarative_base when it is about relations..
It should be very easy for you database guy's (which I'm not,
On Thu, Oct 15, 2009 at 9:21 AM, alexbodn.gro...@gmail.com wrote:
thanks a lot mike, it's working great now.
but this flag should be implied if one of the primary key fields is
nullable (especially since it's not nullable by default).
what would you think?
You can argue just as easily
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Mike Conley
Sent: 15 October 2009 14:43
To: sqlalchemy@googlegroups.com
Cc: SQLElixir
Subject: [sqlalchemy] Re: bad result when querying for null
values (in pk at least)
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 14:42
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Declerative Relation trouble
Hi All,
I am having a very bad day (or two
Hi Simon,
(I do things a little different on the import side)
Working example (very minimised):
from sqlalchemy import
Integer,Column,DateTime,Unicode,UnicodeText,Boolean,ForeignKey,Interval
from sqlalchemy.ext.declarative import declarative_base
import sqlalchemy.orm as orm
Base =
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 15:38
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: Declerative Relation trouble
Hi Simon,
(I do things a little
On Thu, Oct 15, 2009 at 15:43, Mike Conley mconl...@gmail.com wrote:
On Thu, Oct 15, 2009 at 9:21 AM, alexbodn.gro...@gmail.com wrote:
thanks a lot mike, it's working great now.
but this flag should be implied if one of the primary key fields is
nullable (especially since it's not nullable
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 15:55
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: Declerative Relation trouble
I downgraded SQLA to version 0.5.5, no
I downgraded SQLA to version 0.5.5, no luck, (Simon) what version of
python are you using?
On Oct 15, 2009, at 4:45 PM, Martijn Moeling wrote:
Hi Simon/all,
When I run your example i get:
Traceback (most recent call last):
File /var/www/PyWebOs/caltst.py, line 41, in module
cal
On Thu, Oct 15, 2009 at 15:48, King Simon-NFHD78 simon.k...@motorola.com
wrote:
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Mike Conley
Sent: 15 October 2009 14:43
To: sqlalchemy@googlegroups.com
Cc: SQLElixir
Subject:
Hi All,
bad problem
I have trouble making relations in SQLA. My code runs on Simons
computer but his (and mine) not.
I downgraded SLQA from 0.5.6. to 0.5.5 to have the same version, still
no luck.
I run Python 2.6.2 and Simon 2.5.1 Downgrading Python is a hassle at
the moment
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 16:21
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re:[runs one one installation not on
the other] Declerative Relation trouble
Mod_python has nothing to do with this project, so I run it
from idle within X
On Oct 15, 2009, at 5:23 PM, King Simon-NFHD78 wrote:
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 16:21
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 16:27
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: [runs one one installation not on
the other] Declerative Relation trouble
As far as I understand eager loading it works by adding a join clause
to the select. That has the drawback of increased number or rows
returned. Imagine having 100 objects and each with 200 related
objects, most of which overlap so the total number of related objects
is about 300. That will
(in the mean time I drove home. dinner soon)
Indeed, running it from command line changes things,
Strange since I even rebooted the machine in the process, but since I
was messing with the code It could well have been really broken.
Your sample works from the command line, mine still
Emil Ivanov wrote:
As far as I understand eager loading it works by adding a join clause
to the select. That has the drawback of increased number or rows
returned. Imagine having 100 objects and each with 200 related
objects, most of which overlap so the total number of related objects
is
Michael Bayer wrote:
Emil Ivanov wrote:
As far as I understand eager loading it works by adding a join clause
to the select. That has the drawback of increased number or rows
returned. Imagine having 100 objects and each with 200 related
objects, most of which overlap so the total number
Dear All People:
I'm using SQLSoup and getting errors like InvalidRequestError: Can't
reconnect until invalid transaction is rolled back and MySQL Server
has gone away. I have set autoflush=True and this has helped mitigate
some errors, but not these, they happen with varying frequency when I
Emil Ivanov wrote:
As far as I understand eager loading it works by adding a join clause
and...the rationale for the Hibernate feature is to optimize *lazy*
loading, not eager loading - its a query that you only want if needed.
Also hibernate does a poor job with join-based eager loading -
Jeff Cook wrote:
Dear All People:
I'm using SQLSoup and getting errors like InvalidRequestError: Can't
reconnect until invalid transaction is rolled back and MySQL Server
has gone away. I have set autoflush=True and this has helped mitigate
some errors, but not these, they happen with
It's not faster. I use pyscopg2 directly on some other projects and
it's definitely a lot faster to just be able to write the query I want
than to try to think of how to convert it to SQLAlchemy's contexts and
functions. Maybe it's just learning curve thing, but as shown, I can't
get that join to
Jeff Cook wrote:
I don't fully understand what you're talking about. I have this error
and I need to make it stop. I just want SQLAlchemy to connect, run the
query I instructed, and give me the results back and do this reliably
without necessitating consistent server restarts. Thus far, it's
I see. So Pylons should handle this by default, but it's not doing so?
That's highly disappointing. Clearly, something is quite incorrect
here. Is my usage of SQLSoup causing rollback not to run?
On Thu, Oct 15, 2009 at 1:16 PM, Michael Bayer mike...@zzzcomputing.com wrote:
Jeff Cook wrote:
I
And when things _do_ work, there are serious caching problems.
Sometimes it gives me the transaction rollback error, sometimes it
gives me an old version of the page, and sometimes it gives me a
current version of the page. I assume this has something to do with
what connection is getting used.
thatsanicehatyouh...@mac.com wrote:
Hello,
On 12 Oct 2009, at 21:04, Michael Bayer wrote:
On Oct 12, 2009, at 4:26 PM, thatsanicehatyouh...@mac.com wrote:
Hello,
I have a custom type defined in my postgresql database, and this is
giving me the warning:
Thanks for the tip about TypeDecorator I got it working to parse up the
string, still not sure why SA is returning a string and not a tuple of
integers,
but at this point I have a good work-around and I'm happy. Especially
since TypeDecorator allows me to return those numbers
as a dictionary.
Hi Michael,
Thanks for clarifying that for me. For anyone interested, this is what
I ended up with:
from sqlalchemy import String
sa_major_version = sqlalchemy.__version__[0:3]
if sa_major_version == 0.5:
from sqlalchemy.databases import postgres
David Gardner wrote:
Thanks for the tip about TypeDecorator I got it working to parse up
the string, still not sure why SA is returning a string and not a
tuple of integers,
but at this point I have a good work-around and I'm happy. Especially
since TypeDecorator allows me to return those
Ok here is the deal
Since I sometimes need to run multiple instances of idle in the same
shell,so I use the -n switch by default:
8
[removed~u...@removed~host ~]# idle --help
Error: option --help not recognized
USAGE: idle
Aha! thanks for the tip.
You are right, because that is the way psql returns it.
I re-wrote my PostgreSQL function to return an array of bigint,
which then psycopg2 and SQLAlchemy see as an array of integers, which
works out really great for me.
I don't think SA is at fault: I believe that
On Oct 15, 2009, at 3:32 PM, Jeff Cook wrote:
And when things _do_ work, there are serious caching problems.
Sometimes it gives me the transaction rollback error, sometimes it
gives me an old version of the page, and sometimes it gives me a
current version of the page. I assume this has
OK, man, well, I have one function that has the calls to perform the
listing. I refresh and sometimes get old data and sometimes don't.
There is no clustering and no other databases, there is no possibility
that the server is retrieving old data. I haven't changed the base
Pylons classes at all,
38 matches
Mail list logo