On Aug 5, 10:59 pm, drakkan drakkan1...@gmail.com wrote:
Seems that once I defined a scoped session as:
Session = scoped_session(sessionmaker())
I can switch to a non scoped session simply calling:
sess=Session()
...
is this the intended behaviuor?
Yes that is intended behavior. But if
On 8/6/09 09:30 , werner wrote:
IIRC correctly the __init__ section is only needed if you want to do:
add = Address('an email address')
I never do this, i.e. I assign like this
add = Address()
add.email_address = 'an email address'
You can also do this with the default declarative base
I don't have a lot of experience with geodatabases so I can't evaluate
this from a practical perspective, but I do have a couple of thoughts
about the general design.
I'm not too keen on having the geometry functions as methods on the
comparator. Having them there creates a namespace collision
Hi Michael,
the problem does not occur, when the autoincrement is set to True, so
your fix works correctly.
The problem of the generated id not being set only turned up again,
when I was experimenting with autoincrement=False (to fix the dialect
problem at table creation time) in conjunction
Hi,
I can't figure how that occurs but I'm facing to a stange ?bug?. (I
try to write a testcase but without success)
After a call to session.query(MClass).get(id), the returned object has
all these attributes marked as unloaded
If I do a session.refresh(myObject), attributes are correctly
I don't know if it's relevant with my prob but my application ends
with the following errors
Exception exceptions.AttributeError: 'NoneType' object has no
attribute 'from_attribute' in bound method
MutableAttrInstanceState._cleanup of
sqlalchemy.orm.state.MutableAttrInstanceState object at
Hi Ants,
Thanks for the valuable feedback.
On Thu, Aug 6, 2009 at 2:30 PM, Ants Aasmaants.aa...@gmail.com wrote:
I don't have a lot of experience with geodatabases so I can't evaluate
this from a practical perspective, but I do have a couple of thoughts
about the general design.
I'm not
We are rolling out some SQLAlchemy infrastructure at work and came
across an interesting issue. We are using the mssql dialect on top of
pyodbc to talk to both SQL Server and Sybase dataservers. We use bound
metadata and scoped session_maker with autocommit=True. First off, the
problem we
On Aug 6, 4:09 pm, Sanjiv Singh singhsanj...@gmail.com wrote:
Also the GeometryDDL and Geometry classes could use some refactoring
to support extensibility of adding new dialects. Probably via a
registry that maps dialects to their geometry implementations. Also,
the GeometryDDL doesn't
Awesome. Thanks for elaborating.
Sanjiv
On Thu, Aug 6, 2009 at 7:38 PM, Ants Aasmaants.aa...@gmail.com wrote:
On Aug 6, 4:09 pm, Sanjiv Singh singhsanj...@gmail.com wrote:
Also the GeometryDDL and Geometry classes could use some refactoring
to support extensibility of adding new dialects.
sagblmi wrote:
I don't know if it's relevant with my prob but my application ends
with the following errors
Exception exceptions.AttributeError: 'NoneType' object has no
attribute 'from_attribute' in bound method
MutableAttrInstanceState._cleanup of
phrrn...@googlemail.com wrote:
We are rolling out some SQLAlchemy infrastructure at work and came
across an interesting issue. We are using the mssql dialect on top of
pyodbc to talk to both SQL Server and Sybase dataservers. We use bound
metadata and scoped session_maker with
On Aug 6, 3:30 am, werner wbru...@free.fr wrote:
I never do this, i.e. I assign like this
add = Address()
add.email_address = 'an email address' In what way is the Address object
expected to be instantiated such
that it receives the correct user id?
You just do this and SA will take
On Aug 6, 4:59 am, Wichert Akkerman wich...@wiggy.net wrote:
On 8/6/09 09:30 , werner wrote:
IIRC correctly the __init__ section is only needed if you want to do:
add = Address('an email address')
I never do this, i.e. I assign like this
add = Address()
add.email_address = 'an
Michael Bayer wrote:
Some DBAPI's provide autocommit modes, but since these are not
standardized or universally available, and because SQLA has its own
autocommit that works very nicely and consistently, SQLA has no support
for them. I dont know what Pyodbc provides.
note however that
On Aug 5, 6:29 pm, AF allen.fow...@yahoo.com wrote:
Hello,
Where do you folks recommend storing the database connection string in
my application. Clearly not in the same file with my declaratively
defined model objects.
And more generally, how do you recommend laying out an SQLAlchemy
Still having a little trouble...here are the relevant mappings:
orm.mapper(Keyphrase, keyphrase_table, properties = {
'message':orm.relation(Message, backref='keyphrase'),
'campaign':orm.relation(Campaign, backref='keyphrase'),
'actions':orm.relation(KeyphraseAction),
Also, the following does nothing at all (does not delete and throws no
errors):
for ka in kp.actions:
del ka
But this:
del kp.actions
Throws the same assertion error.
On Aug 6, 11:01 am, Hollister a.hollister.willi...@gmail.com wrote:
Still having a little trouble...here
When looking for the session status I've
session.is_active == True
When checking the log file I don't have 'commit ' between working and
failing code. I don't know if it's normal but I've a strange behaviour
with session.query().get()
For the same Class and Id, If I call X times
sagblmi wrote:
When looking for the session status I've
session.is_active == True
When checking the log file I don't have 'commit ' between working and
failing code. I don't know if it's normal but I've a strange behaviour
with session.query().get()
For the same Class and Id, If I call X
you're probably looking for delete-orphan cascade in this case, if objects
have foreign keys on their primary key columns you'd like them to be
deleted when deassociated with their parent object.
Hollister wrote:
Also, the following does nothing at all (does not delete and throws no
errors):
Hello,
What is the correct way to use remote_side single_parent relation
parameters under Declarative Base?
I'm trying to create an Adjacency List Relationship as suggested in
the docs, but I am not sure how to do this with Declarative Base.
I tried:
children = relation(Node,
Allen,
allen.fowler wrote:
...
What is that __repr__ function doing exactly? Looks interesting.
It is really useful, and yes Michael comes up with beauties like this.
Produces nice print output, i.e.:
print 'after flush'
print con
print add
Will give you:
after flush
greetings,
i've been using mysql, SA ORM (scoped_session) with cherrypy and all
is fine. however, i'm also using some MySQLdb-based connections and
getting pretty tired of the 'mysql gone away' issues and lame db.ping
() workarounds. hence, i want to move everything to SA using the
Woops I thought I was reading a pylons group when I replied to
your message. Not much of that will make any sense in a pure
sqlalchemy world.
-- W
On Aug 6, 7:56 am, allen.fowler allen.fow...@yahoo.com wrote:
On Aug 5, 6:29 pm, AF allen.fow...@yahoo.com wrote:
Hello,
Where do you
That's what .ini files are for (that thing you generated with make-
config). Search for instructions regarding sqlalchemy.dburi in a .ini
file if you want to have your connection magically setup for you and a
single database is enough.
For working with multiple databases, there's no universal
Hi,
I am using sqlalchemy through its orm layer. The basic flow of my
program is this:
1. Download about 18000 web pages and store the raw HTML in a table
2. Iterate through each web page and use pyparsing to parse it. I
then insert the results of that
parsing into about a dozen different
When populating objects through the ORM, I'd like to interpret all
NULL values fetched from VARCHAR2 / NVARCHAR2 columns in the database
as empty strings ('') instead of `None`s.
Is there any way to set that behavior globally? Failing that, how
would you recommend doing it?
(I'm using Oracle,
Catherine Devlin wrote:
When populating objects through the ORM, I'd like to interpret all
NULL values fetched from VARCHAR2 / NVARCHAR2 columns in the database
as empty strings ('') instead of `None`s.
Is there any way to set that behavior globally? Failing that, how
would you recommend
Brian Granger wrote:
Hi,
I am using sqlalchemy through its orm layer. The basic flow of my
program is this:
1. Download about 18000 web pages and store the raw HTML in a table
2. Iterate through each web page and use pyparsing to parse it. I
then insert the results of that
parsing
allen.fowler wrote:
I tried:
children = relation(Node, backref=backref(parent,
remote_side=nodes.id))
got it to work with:
remote_side=[id]
But:
1) Why is remote_side a list?
in this case you could just say remote_side=id. its optionally a list if
multiple columns occur on the
On Aug 6, 4:05 pm, Michael Bayer mike...@zzzcomputing.com wrote:
allen.fowler wrote:
I tried:
children = relation(Node, backref=backref(parent,
remote_side=nodes.id))
got it to work with:
remote_side=[id]
But:
1) Why is remote_side a list?
in this case you could just say
Hello all,
Has anyone here used the sqlamp: Materialized Path for SQLAlchemy
library?
I am wondering:
1) Does it seem to work well?
2) Did you use it with Declarative Base, and if so, how did you
configure it?
Thank you,
:)
--~--~-~--~~~---~--~~
You received
Thanks for the information Mike. I do have a listener in place already
but decided to poke in the configuration directly when creating the
engine:
'connect_args' : {'autocommit' : True,
}
I found some very interesting results by experimenting with vanilla
pyodbc and
On Aug 6, 2009, at 8:39 PM, phrrn...@googlemail.com wrote:
Thanks for the information Mike. I do have a listener in place already
but decided to poke in the configuration directly when creating the
engine:
'connect_args' : {'autocommit' : True,
}
I found some
They differ mainly on 'new' stuff (where new is anything 15 years
old!) but for the kind of SELECT queries generated by SA we haven't
seen any problems at all (yet!). We decided to go ahead and use the
mssql dialect for read-only apps and postpone the remaining work on
the Sybase dialect on top
is there something similar to inspectdb in sqlalchemy
where it returns orm classes for tables already in the db?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
37 matches
Mail list logo