Is it possible to use SA with SQLRelay?
--~--~-~--~~~---~--~~
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
Is it possible to use SA with SQLRelay?
I Think yes if you are using MySQL or PostgreSQL, they have a Client
Native API Wrapper, so you can try it.
For others, I suggest the SA Core team to write the driver fot that
client API, because it can be very useful in many cases.
Att
--
Alexandre
Hi all,
sometime since version 0.4.2, the after_update hook of a
MapperExtension fires even if no SQL UPDATE statement is generated. Is
this a bug or a feature?
In my case, an object is marked as dirty because a backref has
changed, not because of any change in the object itself. A merge(...,
It seems there must be something I'm missing here, so hopefully other
sets of eyes will spot an obvious mistake.
I have a series of objects that may-or-may not be persistent: some
will be created and stored to a db, some will be retrieved from the
db, maybe modified and updated, others
Hi,
I recently upgrade from sqlalchemy 0.3.10 to 0.4.2p3.
I have a method like this:
def getPlanillaDet(self, plan_id):
return
session.query(PlanillaDet).filter_by(Planilladet.c.plan_id==plan_id).all()
Now, after update, when I try to execute this method, I get an
exception with the
On Jan 14, 2008, at 5:30 AM, klaus wrote:
Hi all,
sometime since version 0.4.2, the after_update hook of a
MapperExtension fires even if no SQL UPDATE statement is generated. Is
this a bug or a feature?
this is a feature, the save_obj() method is including your object but
no UPDATE is
On Jan 14, 2008, at 9:38 AM, maxi wrote:
Hi,
I recently upgrade from sqlalchemy 0.3.10 to 0.4.2p3.
I have a method like this:
def getPlanillaDet(self, plan_id):
return
session
.query(PlanillaDet).filter_by(Planilladet.c.plan_id==plan_id).all()
Now, after update, when I try to
Thaks for your help.
Can you post an example over how to use filter and filter_by in new
sqlalchemy versions?
Is your recommendation included in 0.3 to 0.4 migration guide?
Why this change?
Regards.
--~--~-~--~~~---~--~~
You received this message because you
On Jan 14, 2008, at 10:44 AM, Alexandre Conrad wrote:
Michael Bayer wrote:
I came up with a very easy way to implement this which I'd like you
to
try out in rev 4060. So far I've tested with a basic joined table
inheritance setup.
All you do is place class-mapped attributes
On Jan 14, 2008, at 8:41 AM, svilen wrote:
i have, say, base class A, inherited by two children B and C. B has an
attribute/relation 'address', A and C do not have it.
So i had a query(A).eagerload( 'address') and that did work before
r3912. But later it gives an error - mapper|A has no
I am a bit confused by the behavior for the methods all() and one() if
the Query would return an empty result set. In the case of all() it
returns an empty list whereas one() will throw an exception
(sqlalchemy.exceptions.InvalidRequestError). I am sure there was a
reason to implement as it is
all() returns whatwever is there, 0, 1, n
first() returns first if any or None
one() asserts there's exactly 1
On Monday 14 January 2008 18:23:28 Adrian wrote:
I am a bit confused by the behavior for the methods all() and one()
if the Query would return an empty result set. In the case of
On Monday 14 January 2008 17:19:14 Michael Bayer wrote:
On Jan 14, 2008, at 8:41 AM, svilen wrote:
i have, say, base class A, inherited by two children B and C. B
has an attribute/relation 'address', A and C do not have it.
So i had a query(A).eagerload( 'address') and that did work
On Jan 14, 2008, at 11:23 AM, Adrian wrote:
I am a bit confused by the behavior for the methods all() and one() if
the Query would return an empty result set. In the case of all() it
returns an empty list whereas one() will throw an exception
(sqlalchemy.exceptions.InvalidRequestError). I
On Jan 14, 2008, at 11:29 AM, svilen wrote:
On Monday 14 January 2008 17:19:14 Michael Bayer wrote:
On Jan 14, 2008, at 8:41 AM, svilen wrote:
i have, say, base class A, inherited by two children B and C. B
has an attribute/relation 'address', A and C do not have it.
So i had a
On Jan 14, 2008, at 10:44 AM, Alexandre Conrad wrote:
model.Media.query.join([catalog,
model
.CatalogChannel
.channel
]).filter
(model.CatalogChannel.c.id_channel==c.playlist.id_channel).all()
is CatalogChannel.channel a self referential relation to another
Channel ? the classes you
On Jan 14, 2008, at 12:04 PM, Michael Bayer wrote:
On Jan 14, 2008, at 11:59 AM, Michael Bayer wrote:
On Jan 14, 2008, at 10:44 AM, Alexandre Conrad wrote:
model.Media.query.join([catalog,
model
.CatalogChannel
.channel
]).filter
Mike,
Michael Bayer wrote:
a certain id_channel. otherwise im still having trouble wrapping my
head around what youre trying to do there.
Enough guessing, here's the full test case with description of what I'm
trying to do. :)
Although, I wasn't able to make it run with sqlite, so it's
On Jan 14, 2008, at 12:12 PM, Alexandre Conrad wrote:
Mike,
Michael Bayer wrote:
a certain id_channel. otherwise im still having trouble wrapping my
head around what youre trying to do there.
Enough guessing, here's the full test case with description of what
I'm
trying to do. :)
On Jan 14, 2008, at 11:59 AM, Michael Bayer wrote:
On Jan 14, 2008, at 10:44 AM, Alexandre Conrad wrote:
model.Media.query.join([catalog,
model
.CatalogChannel
.channel
]).filter
(model.CatalogChannel.c.id_channel==c.playlist.id_channel).all()
like, are you sure you dont want to
Alexandre Conrad wrote:
under a foo table with MySQL. (another hidden bug, I'm getting
a foo schema/db, not table.
--
Alexandre CONRAD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
On Jan 14, 2008, at 10:44 AM, Alexandre Conrad wrote:
model.Media.query.join([catalog,
model
.CatalogChannel
.channel
]).filter
(model.CatalogChannel.c.id_channel==c.playlist.id_channel).all()
like, are you sure you dont want to just say:
model
.Media
.query
.join
([catalog
]).filter
Michael Bayer wrote:
thats not hidden. SQLite cannot autoincrement primary key columns if
the table contains a composite primary key which is the case here.
Ah, yes. Plus, I don't need composite primary_key here, it's articact
from an old many-to-many secondary table (which I usually set
On Jan 14, 2008, at 12:12 PM, Alexandre Conrad wrote:
Mike,
Michael Bayer wrote:
a certain id_channel. otherwise im still having trouble wrapping my
head around what youre trying to do there.
Enough guessing, here's the full test case with description of what
I'm
trying to do. :)
Michael Bayer wrote:
your best bet with this mapping right now is:
print
Media
.query
.select_from
(media_table
.join
(catalog_table
).join
(catalog_channel_table
)).filter(CatalogChannel.c.id_channel==playlist.id_channel).all()
which is really how select_from() was
Nice, thanks!
On 14 Jan., 16:16, Michael Bayer [EMAIL PROTECTED] wrote:
On Jan 14, 2008, at 5:30 AM, klaus wrote:
Hi all,
sometime since version 0.4.2, the after_update hook of a
MapperExtension fires even if no SQL UPDATE statement is generated. Is
this a bug or a feature?
this is
On Jan 14, 2008, at 12:12 PM, Alexandre Conrad wrote:
Mike,
Michael Bayer wrote:
a certain id_channel. otherwise im still having trouble wrapping my
head around what youre trying to do there.
Enough guessing, here's the full test case with description of what
I'm
trying to do. :)
Mike,
My day is over, I'm leaving the office. I'll read your replies tomorrow.
Thanks for taking some time one that.
Regards,
--
Alexandre CONRAD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
On Jan 14, 2008, at 12:44 PM, Alexandre Conrad wrote:
Michael Bayer wrote:
your best bet with this mapping right now is:
print
Media
.query
.select_from
(media_table
.join
(catalog_table
).join
(catalog_channel_table
On Jan 14, 2008, at 1:46 PM, maxi wrote:
Hi,
In new sqlalchemy version (0.4), the MapperExtension must return
EXT_CONTINUE for each method. Now, all methods must return this const?
For instance,
I've the next extension for my mapper:
class ConvenioExtension(MapperExtension):
def
Hi,
In new sqlalchemy version (0.4), the MapperExtension must return
EXT_CONTINUE for each method. Now, all methods must return this const?
For instance,
I've the next extension for my mapper:
class ConvenioExtension(MapperExtension):
def create_instance(self, mapper, selectcontext, row,
Hi,
Follwing with my 0.3 to 0.4 upgrade, now I get the next problem...
When I try to save an object across my session, I get an
InvalidRequestError exception with the message:
File c:\programs\python25\lib\site-packages\sqlalchemy-0.4.2p3-
py2.5.egg\sqlalchemy\orm\session.py, line 988, in
On Jan 14, 2008, at 2:32 PM, maxi wrote:
Hi,
Follwing with my 0.3 to 0.4 upgrade, now I get the next problem...
When I try to save an object across my session, I get an
InvalidRequestError exception with the message:
File c:\programs\python25\lib\site-packages\sqlalchemy-0.4.2p3-
I must use save_update alone or save_update + flush ?
--~--~-~--~~~---~--~~
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
The mssql URI is going to take the same conceptual form as any other
sqlalchemry dburi. The format is documented and available in the SA docs. We
can't give you the exact URI, because it's going to contain things that are
specific to your application, like database name, password, etc.
ODBC under
flush() works exactly as before.
the difference that Mike is pointing out is that 0.3 allowed
already-persisted objects to be re-added, which was a bug that is now fixed.
Using save_or_update() instead of save() will help you avoid triggering the
error when the object you're trying to .save() is
Hello,
I need to extend my turbogears app to get some records from ms sql.
Do you guys know how to setup the ms sql dbi uri to work with sqlalchemy?
What connection uri do I use?
How do I setup unix odbc for it?
Anything else I need?
Can you give me exact instructions?
Thanks,
Lucas
--
But, is my design mistake ?
I must use ever save_or_update() function?
In my case, I have two process working over the same class of
bussines object.
I do a query, which return me an object list and I call to other
function which pass one parameter (id) and this function do other
query over the
Well, the my_service.get_people() most likely uses a query to retrieve those
people from the database, right? That query would have the effect of putting
those results into the session as persistent objects. When you call
session.save() on one of those already-persisted objects, the session checks
Is solved the problem involved in py2exe and sqlalchemy 0.3 ?
Can I use py2exe without problem with loggin module?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send
Good points - although restructuring the database around integer PKs
is out of the question at the moment and we also need to support
operations where 'road shoot' databases are merged into our master
database... so we do have one legitimate use for GUIDs :)
If I run across a way to fetch
This is going to sound kind of strange, but I've noticed that sometimes when
doing fairly large eager loads, that not everything always loads.
So running, say
custlist = S.query(Customer).options(eagerload('addresses'),
eagerload('properties')).filter(Customer.id.in_([...])).all()
and fetching
Update: it's not the length of the fetch, a smaller fetch still has holes
it it. Looks as if something might be short-circuiting the SA internal
join?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
On Jan 14, 2008, at 8:11 PM, Rick Morrison wrote:
This is going to sound kind of strange, but I've noticed that
sometimes when doing fairly large eager loads, that not everything
always loads.
So running, say
custlist = S.query(Customer).options(eagerload('addresses'),
I had already put together a short test case which as usual is of course
working fine, but it's greatly simpler than the in-application use and uses
sqlite instead of MSSQL, so I'll bang on it from time to time as I've got a
few seconds and I'll see where it goes.
I did notice some behavior that
45 matches
Mail list logo