clarification for this below; i have non-ORM updates happening inside
ORM transaction (in after_insert() etc). How to make them use the
parent transaction? i have a connection there.
and, why atomic updates also have with commit after them? or is
this sqlite-specific?
every CRUD
Hi, I have this strange bug or problem...
I have a basic class like this mapped to a table with the same name.
Metatype is a relation to the metatype object.
class MetaData(DBObject):
def __init__(self, metatype, value, item):
self.metatype = metatype
i have non-ORM updates happening inside
ORM transaction (in after_insert() etc). How to make them use the
parent transaction? i have a connection there.
You can pass in the Session and use Session.execute() to reuse the session
connection.
--~--~-~--~~~---~--~~
in the after_*() there are (mapper, connection, instance) arguments -
but there's no session. Any way to get to that? mapext.get_session()
does not look like one
http://www.sqlalchemy.org/docs/04/sqlalchemy_orm.html#docstrings_sqlalchemy.orm_modfunc_object_session
On Tue, 13 Nov 2007 06:00:25 -0800, Simon Pamies [EMAIL PROTECTED] wrote:
[...]
I'm very pleased to announce the release of SQLAutocode 0.4.1 and 0.5.
This tool enables SQLAlchemy users to automagically generate python
code from an existing database layout [...]
Could you perhaps
On Nov 13, 2007, at 8:25 AM, Koen Bok wrote:
Hi, I have this strange bug or problem...
I have a basic class like this mapped to a table with the same name.
Metatype is a relation to the metatype object.
class MetaData(DBObject):
def __init__(self, metatype, value, item):
On Nov 13, 2007, at 2:51 AM, fw wrote:
Hi,
I am having a weird problem. I am dealing with some legacy database,
so I subclass TypeDecorator to help clean things up a bit.
This worked fine in 0.3 but I am now trying to use 0.4 and things
break in the strangest of way.
When I run the
I use a similar technique with a Pylons controller, but instead of
engine.begin(), I use session.begin(). Then by passing around the session
for all calls made by that controller, I can use Session.execute() for
expression-based and text-based SQL mixed with ORM ops, and it all commits
in one shot
Hi Gerhard,
Gerhard Haering wrote:
On Tue, 13 Nov 2007 06:00:25 -0800, Simon Pamies [EMAIL PROTECTED] wrote:
[...]
I'm very pleased to announce the release of SQLAutocode 0.4.1 and 0.5.
This tool enables SQLAlchemy users to automagically generate python
Hi,
I've attached a test script as I'm confused with what I'm trying to do.
I have the following scenario:
- A Channel object is TV channel:
class Channel:
pass
- A Playlist object is a piece of a channel's TV program.
class Playlist:
pass
- A Playlist can be declined as different
fw wrote:
Hi,
I am having a weird problem. I am dealing with some legacy database,
so I subclass TypeDecorator to help clean things up a bit.
This worked fine in 0.3 but I am now trying to use 0.4 and things
break in the strangest of way.
When I run the file below, Python complains
Hi,
Could you perhaps explain the advantages/differences to autoload=True or
perhaps SqlSoup?
To me, it's quite a different approach to managing your database schema.
Using autoload or sqlsoup, the database holds the master definition of
the schema, and your program automatically loads
what a coincidence, 2 days ago we stepped on this bindparam-types
thing; table.some_decimal_column == decimal.Decimal(5) did not always
work.
now it mostly works, i think there is one more case that breaks for
me: when the column itself is hidden in a function.
e.g.
table_A = Table(
On Nov 13, 2007, at 12:24 PM, svilen wrote:
what a coincidence, 2 days ago we stepped on this bindparam-types
thing; table.some_decimal_column == decimal.Decimal(5) did not always
work.
now it mostly works, i think there is one more case that breaks for
me: when the column itself is
On Nov 13, 4:53 pm, Werner F. Bruhin [EMAIL PROTECTED] wrote:
Gerhard Haering wrote:
On Tue, 13 Nov 2007 06:00:25 -0800, Simon Pamies [EMAIL PROTECTED] wrote:
Could you perhaps explain the advantages/differences to autoload=True
I understand that autoload=True has a pretty high overhead.
On Nov 13, 6:09 pm, Paul Johnston [EMAIL PROTECTED] wrote:
Could you perhaps explain the advantages/differences to autoload=True or
perhaps SqlSoup?
To me, it's quite a different approach to managing your database schema.
Using autoload or sqlsoup, the database holds the master
On Monday 12 November 2007 23:11:25 Michael Bayer wrote:
On Nov 12, 2007, at 2:07 PM, [EMAIL PROTECTED] wrote:
hi
1st one: i am saving some object; the mapperExtension of the
object fires additional atomic updates of other things elsewhere
(aggregator).
These things has to be
On Nov 13, 2007, at 2:00 PM, svilen wrote:
i'm not sure if i am doing proper thing at all.
Something like i need intermediate flush() to get B in the database
first; then the insert of A will update that B and expire it
eventualy.
i.e. i need to have the B record in the DB in order to
I have this SQL expression (from
http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html)
SELECT b.*
FROM tagmap bt, bookmark b, tag t
WHERE bt.tag_id = t.tag_id
AND (t.name IN ('bookmark', 'webservice', 'semweb'))
AND b.id = bt.bookmark_id
GROUP BY b.id
HAVING COUNT( b.id )=3
How
On Nov 13, 2007, at 5:17 PM, Andrew Stromnov wrote:
I have this SQL expression (from
http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html)
SELECT b.*
FROM tagmap bt, bookmark b, tag t
WHERE bt.tag_id = t.tag_id
AND (t.name IN ('bookmark', 'webservice', 'semweb'))
AND
Hi,
I'm very pleased to announce the release of SQLAutocode 0.4.1 and
0.5. This tool enables SQLAlchemy users to automagically generate
python code from an existing database layout and even has the
possibility to generate example code working with the generated
model. It now supports SA
On Nov 13, 2007 5:14 AM, Simon Pamies [EMAIL PROTECTED] wrote:
Hi,
I'm very pleased to announce the release of SQLAutocode 0.4.1 and
0.5. This tool enables SQLAlchemy users to automagically generate
python code from an existing database layout and even has the
Hey Simon, I found your code
On Nov 13, 2007 4:44 PM, m h [EMAIL PROTECTED] wrote:
On Nov 13, 2007 5:14 AM, Simon Pamies [EMAIL PROTECTED] wrote:
Hi,
I'm very pleased to announce the release of SQLAutocode 0.4.1 and
0.5. This tool enables SQLAlchemy users to automagically generate
python code from an existing
Hi,
I am going over this this example to learn how to construct an eager-
loaded adjacency tree,
http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/examples/adjacencytree/byroot_tree.py
and I noticed that some of the keys in the treenodes table are given
long names in the table
Hi Rick,
I use a similar technique with a Pylons controller, but instead of
engine.begin(), I use session.begin(). Then by passing around the
session for all calls made by that controller,
I had so much legacy SA code, that I just couldn't easily retrofit this
pattern throughout the code,
bob wrote:
Hi,
I am going over this this example to learn how to construct an eager-
loaded adjacency tree,
http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/examples/adjacencytree/byroot_tree.py
and I noticed that some of the keys in the treenodes table are given
long names in
Thanks for clearing that up! :)
Bob
--~--~-~--~~~---~--~~
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
I didn't see any tickets about this on the trac, so I thought I'd
bring it to everyones attention. Since it's a development version I
wasn't sure if this mattered (or was known about), so if it does I can
draft up a quick test case.
--~--~-~--~~~---~--~~
You
Hello -
I'm learning SA at the moment (using 0.4), so I apologize if any
questions go against the grain or assume something silly, I'm looking
for the SA answer to how to do the following things. Similarly, I'm
going to throw some possible syntax up, but I don't know the SA style
well enough yet
On Nov 13, 2007, at 7:46 PM, Huy Do wrote:
Hi Rick,
I use a similar technique with a Pylons controller, but instead of
engine.begin(), I use session.begin(). Then by passing around the
session for all calls made by that controller,
I had so much legacy SA code, that I just couldn't easily
definitely need a test case illustrating what problem you encountered.
On Nov 13, 2007, at 9:17 PM, Chris M wrote:
I didn't see any tickets about this on the trac, so I thought I'd
bring it to everyones attention. Since it's a development version I
wasn't sure if this mattered (or was
I was hoping that I could create a another session using another
engine
(non threadlocal), for these special cases. I have not yet run into
this
need yet. Just out of interest, have you run into any such use cases ?
Thanks
if youre using threadlocal engine, you can still say
http://www.sqlalchemy.org/trac/ticket/864
On Nov 13, 10:35 pm, Michael Bayer [EMAIL PROTECTED] wrote:
definitely need a test case illustrating what problem you encountered.
On Nov 13, 2007, at 9:17 PM, Chris M wrote:
I didn't see any tickets about this on the trac, so I thought I'd
Thanks for the answer.
The trace is
Traceback (most recent call last):
File test.py, line 227, in ?
StockItem.mapper[Primary]=mapper(StockItem, tblStock,
properties={
File .../sqlalchemy/orm/__init__.py, line 518, in mapper
return Mapper(class_, local_table, *args, **params)
File
Thanks for the answer
It looks indeed like a log operation.
When adding __repr__ no error message.
Spot on.
Cheers,
François
File test.py, line 230, in ?
StockItem.mapper[Primary]=mapper(StockItem, tblStock,
properties={
AttributeError: type object 'StockItem' has no
35 matches
Mail list logo