I'm using merge to push objects into a db. (Long story short: I have
a set of objects that have to behave identically if they are
persisted or not, and may be retrieved or sent to a set of databases.
Hence the use of merge.) However, merged objects appear object
joined by a relation and
On Jan 23, 2008 10:24 PM, Monty Taylor [EMAIL PROTECTED] wrote:
This may or may not be elixir specific...
If I have an auto-generated mapping table for a many-to-many
relationship, is there a sensible way to add another column to it that's
also has a foreign key relationship to a third
On Jan 25, 2008 9:18 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Jan 25, 2008, at 2:02 PM, Kumar McMillan wrote:
On Jan 25, 2008 11:58 AM, Michael Bayer [EMAIL PROTECTED]
wrote:
The Session.mapper function is not worth it, in my opinion, it exists
due to the sheer popularity of
Gaetan de Menten wrote:
The only thing, is that we still provide a default session,
which is based on Session.mapper, for convenience and backward
compatibility. Maybe we should state more prominently in the
Elixir doc that this is only a default session and that you can
use any session you
its the backref. as a temporary workaround you can remove it for
merge() to function properly. fix wil be out today and very possible
release 0.4.3 will be today for this.
On Jan 30, 2008, at 6:14 AM, Paul-Michael Agapow wrote:
from sqlalchemy import *
from sqlalchemy.orm import
OK this issue is actually limited to transient objects only; that
is, if you had flushed your session before doing the merge() it would
have worked. The fix is in r4104. Im considering putting out 0.4.3
today as a mostly bugfix release but have not decided yet.
On Jan 30, 2008, at 6:14
On Jan 30, 2008, at 12:39 PM, Michael Bayer wrote:
OK this issue is actually limited to transient objects only; that
is, if you had flushed your session before doing the merge() it
would have worked. The fix is in r4104. Im considering putting out
0.4.3 today as a mostly bugfix
Hello,
I have recently converted a Pylons app from SQLObject to SQLAlchemy
0.3.10. Conversion went quite well.
I need to serialize access to some of my objects, so I've looked into
extending MapperExtension as described at [1] to add a mutex on load.
First, I define an extension and
sorry, the docstring is wrong. create_instance() should return
EXT_CONTINUE if it would like to bypass creating the instance itself.
However, self here is the MapperExtension instance, not the mapped
instance. the method is called before anything is created.
if you want to populate an
On Jan 30, 2008, at 2:10 PM, jon wrote:
Thanks for getting back to me and apologies for the stacktrace
barf ;-)
One thing...I have the following line in my environment.py:
config['pylons.g'].sa_engine = engine_from_config(config,
'sqlalchemy.', convert_unicode=True, pool_size=1,
On 0.3.x, use EXT_PASS rather than EXT_CONTINUE.
Michael Bayer wrote:
sorry, the docstring is wrong. create_instance() should return
EXT_CONTINUE if it would like to bypass creating the instance itself.
However, self here is the MapperExtension instance, not the mapped
instance.
oh, 0.3. well theres another question. If you just converted from
SQLObject, why to SA 0.3 ? 0.4 is the currently supported version and
is also vastly superior to 0.3.
On Jan 30, 2008, at 2:40 PM, jason kirtland wrote:
On 0.3.x, use EXT_PASS rather than EXT_CONTINUE.
Michael Bayer
Hi Mike,
Thanks for your patience...here is the entry I have for that table in
model/__init__.py
role_table = Table('role', metadata,
Column('roleseq', Integer, Sequence('roleseq'),
primary_key=True),
I know that I specifically didn't set things up for Unicode in this
app
Thanks - populate_instance does exactly what I was looking for!
I went to SA 0.3 with SAContext because I was familiar with it.
Porting from SQLObject was straightforward, but a fairly large task.
From reading at pylonshq, converting 0.3 to 0.4 seemed to be much
easier than converting SQLObject
hey jon -
OK, I found an issue that is very likely to be what you are
experiencing; easy to fix as always but unless you can run on SVN
trunk r4106, you'll have to workaround it.
There may be a schema identifier somewhere in your app that contains
the identifier 'roleseq' as a unicode
...or is select.alias().count().scalar()the standard way to do this?
On Jan 30, 2008 7:29 PM, Rick Morrison [EMAIL PROTECTED] wrote:
Just noticed that select.count() doesn't work on MSSQL. The implementation
wraps the select() in an outer query; MSSQL requires an alias for the inner
youd have to override visit_select() and pick up on
compiler.is_subquery(). you could then do some tricks similar to what
oracle.py does in visit_select() to create a wrapping layer.
also i noticed the usage of a kwarg 'mssql_aliased' which seems to be
referenced nowhere.
On Jan 30,
On Jan 28, 4:23 pm, Jonathan Ellis [EMAIL PROTECTED] wrote:
What would you like to see covered in an advanced SQLAlchemy session?
Something on association objects would be good.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Thanks Mike,
I've got my local visit_select() a bit munged-up right now with an
implementation of OFFSET, so I'm going to wait a bit on this. In the
meantime, a follow-up:
Not every MSSQL subquery needs to be aliased, only when the subquery is used
as a derived table, as the SA implementation of
On Jan 30, 2008, at 10:52 PM, Rick Morrison wrote:
Thanks Mike,
I've got my local visit_select() a bit munged-up right now with an
implementation of OFFSET, so I'm going to wait a bit on this. In the
meantime, a follow-up:
Not every MSSQL subquery needs to be aliased, only when the
On Jan 30, 2008, at 11:08 PM, Michael Bayer wrote:
you can in fact alias whatever select you want, i think.
select.count() doesn't produce any kind of special construct that
could be detected in the compiler. there is the notion that
subqueries which are used as scalar subqueries, i.e.
21 matches
Mail list logo