I have exactly the same problem with 0.5.3. On one machine the mapping
works fine with 0.5.2 on another with 0.5.3 I get the error you
mentioned.
On Apr 2, 3:36 pm, Andreas Jung li...@zopyx.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I am getting the following error after
On Thursday 09 April 2009 05:14:36 Bobby Impollonia wrote:
Now the decorator swallows exceptions silently. You have to reraise
the exception after rolling back like Michael did. I believe the
correct form is:
Darn.. you're right of course :)
Diez
This is what's working for me with 0.5.3
raw_cs = SERVER=%s;DATABASE=%s;UID=%s;PWD=%s % (server, database,
userid, password)
connection_string = %s:///?odbc_connect=%s % (databasetype,
urllib.quote_plus(raw_cs))
if databasetype in ['mssql']:
connection_string +=
Bobby Impollonia wrote:
Is there a video or slides from that pycon talk available online? I
see the overview on the pycon site
(http://us.pycon.org/2009/tutorials/schedule/2PM4/) and it looks very
interesting.
I looked more at what you said about the parent id column taking
precedence and
On Apr 2, 10:36 am, Andreas Jung li...@zopyx.com wrote:
The related code is:
class Hierarchies(Base, AsDictMixin):
__tablename__ = 'hierarchies'
__table_args__ = ( { 'autoload' : True, })
__mapper_args__ = ({'extension' : HierachiesDeletionLogger()})
On Wed, Apr 8, 2009 at 11:36 PM, mdoar md...@pobox.com wrote:
This is what's working for me with 0.5.3
raw_cs = SERVER=%s;DATABASE=%s;UID=%s;PWD=%s % (server, database,
userid, password)
connection_string = %s:///?odbc_connect=%s % (databasetype,
urllib.quote_plus(raw_cs))
if databasetype
On Apr 9, 8:20 am, Lukasz Szybalski szybal...@gmail.com wrote:
On Wed, Apr 8, 2009 at 11:36 PM, mdoar md...@pobox.com wrote:
This is what's working for me with 0.5.3
raw_cs = SERVER=%s;DATABASE=%s;UID=%s;PWD=%s % (server, database,
userid, password)
connection_string =
I'm using declarative classes for a table with a few foreign keys to
other tables. When I look at the SQL queries I see the query to get
all the rows of the main table and then a few extra queries for each
row's foreign keys; all as expected. However, it seems that since I am
not modifying any of
mdoar wrote:
I'm using declarative classes for a table with a few foreign keys to
other tables. When I look at the SQL queries I see the query to get
all the rows of the main table and then a few extra queries for each
row's foreign keys; all as expected. However, it seems that since I am
On Apr 9, 12:19 pm, Michael Bayer mike...@zzzcomputing.com wrote:
mdoar wrote:
I'm using declarative classes for a table with a few foreign keys to
other tables. When I look at the SQL queries I see the query to get
all the rows of the main table and then a few extra queries for each
Bobby Impollonia wrote:
Is there a video or slides from that pycon talk available online? I
see the overview on the pycon site
(http://us.pycon.org/2009/tutorials/schedule/2PM4/) and it looks very
interesting.
we haven't put anything on line as of yet. I also just remembered that
the
mdoar wrote:
Makes sense. Since I'm using reflection and declarative, I have code
like
aTable = Table(tablename, Base.metadata,
Column('dbid', primary_key=True),
Column('state', index=True),
I'm trying to use SQLAlchemy's executemany syntax in PostgreSQL and
get the last_inserted_ids().
What is the recommended way to get these last_inserted_ids()?
I know that I can access the id attribute for each model instance but
there are hundreds of inserted rows and I would rather retrieve
Yay! I solved it. Thanks for making such a great module.
result =
meta.Session.execute(model.names_table.insert(postgres_returning=[model.names_table.c.id]),
[{'name': x} for x in names])
result.fetchall()
[(40,), (41,), (42,)]
On Thu, Apr 9, 2009 at 6:05 PM, Roy Hyunjin Han
On Apr 9, 2:48 pm, Michael Bayer mike...@zzzcomputing.com wrote:
mdoar wrote:
Makes sense. Since I'm using reflection and declarative, I have code
like
aTable = Table(tablename, Base.metadata,
Column('dbid', primary_key=True),
Roy Hyunjin Han wrote:
I'm trying to use SQLAlchemy's executemany syntax in PostgreSQL and
get the last_inserted_ids().
What is the recommended way to get these last_inserted_ids()?
I know that I can access the id attribute for each model instance but
there are hundreds of inserted rows
Adrian wrote:
in my case it must be something different. The following code works
perfectly fine in 0.5.2:
mapper(Contact, CONTACTS)
mapper(Atom, ATOMS,
properties = {
'Contacts': relation(Contact,
primaryjoin = Contact.atom_id==ATOMS.c.id,
Roy Hyunjin Han wrote:
Yay! I solved it. Thanks for making such a great module.
result =
meta.Session.execute(model.names_table.insert(postgres_returning=[model.names_table.c.id]),
[{'name': x} for x in names])
result.fetchall()
[(40,), (41,), (42,)]
this is not going to work
mdoar wrote:
i think you mean to say here that foreign_keys=Defect.state. if the
foreign keys are on the other side, thats one to many.
I do indeed have it set up as one to many and then I get the first
instance.
Does that change the solution?
in that case SQLA doesn't have what it needs
19 matches
Mail list logo