>
> today, we have this issue, which I can confirm has existed since version
> 1.2 over two years ago, reported for the first time ever here, and then a
> day later in https://github.com/sqlalchemy/sqlalchemy/issues/4947 .
>
Even more funny is that this Issue uses a tenant in the provided
On Wed, Oct 23, 2019 at 3:16 PM Mike Bayer wrote:
>
>
> On Tue, Oct 22, 2019, at 12:30 PM, eric.lemo...@gmail.com wrote:
>
>
>
>
> it sounds like you should use a bound parameter with a lambda inside of
> it, there's not an explicit "on lazyload" hook at the moment.
>
>
> Yep, that seems to be
it sounds like you should use a bound parameter with a lambda inside of it,
> there's not an explicit "on lazyload" hook at the moment.
>
Yep, that seems to be doing the job!
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code,
On Tue, Oct 22, 2019 at 5:59 PM Mike Bayer wrote:
>
>
> On Tue, Oct 22, 2019, at 11:58 AM, Eric Lemoine wrote:
>
>
>
> The first time before_compile is called twice, one call for the SELECT FROM
> "user" query, and another call for the SELECT FROM "
> The first time before_compile is called twice, one call for the SELECT FROM
> "user" query, and another call for the SELECT FROM "address" query. But the
> second time before_compile is called only once. It's called for the SELECT
> FROM "user" query, but not for the SELECT FROM "addresses"
Hi
I want to use the FilteredQuery pattern [1], but I am facing a problem
related to SQLAlchemy not calling "before_compile" as often as I'd expect
it.
Here's a simple example:
@event.listens_for(Query, "before_compile", retval=True)
def before_compile(query):
print("X before_compiled
://groups.google.com/d/msg/geoalchemy/uqr6DVzotaA/aHXcGfUDca8J.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 94
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed
doing something wrong, or is SQLAlchemy just not dealing with
and for the moment? FYI, __add__ works just fine.
Thank you.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http
On Tue, Sep 4, 2012 at 4:36 PM, Michael Bayer mike...@zzzcomputing.com wrote:
Those methods aren't part of the contract at the moment but I can add them in.
I can live without them, it'd just be nice to be able to use the
actual PostGIS operators in SQLAlchemy apps.
Thank you!
--
Eric
keyword argument 'escape'
I should be able to override contains, no?
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because
for the explanation.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed to the Google Groups
sqlalchemy
On Tue, Sep 4, 2012 at 5:20 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
On Tue, Sep 4, 2012 at 5:18 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
can't do __contains__ due to Python behavior:
class Foo(object):
def __add__(self, other):
return (self, add, other
On Tue, Sep 4, 2012 at 5:30 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 4, 2012, at 11:24 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:20 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
On Tue, Sep 4, 2012 at 5:18 PM, Michael Bayer mike...@zzzcomputing.com
wrote
On Tue, Sep 4, 2012 at 5:38 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 4, 2012, at 11:32 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:30 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Sep 4, 2012, at 11:24 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:20 PM
call receives what's returned from the
inner ST_AsBinary call). It would work if ST_AsBinary was idempotent,
but it's not in PostGIS 2
(http://trac.osgeo.org/postgis/ticket/1869).
I'm stuck on this one.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac
that the fix might hit some other cases that aren't
handled yet, if you get any errors about .name or .key with more complex
expressions let me know.
Will do.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo
name
being geom I'd expect the following to work:
s = select([lakes])
for row in conn.execute(s):
geom = row['geom']
but it won't work because row does not have a geom item.
Is there a solution to this issue?
Thanks,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le
) \
.get_property(self.target)
child_cls = relationship_property.argument
o = Session.query(child_cls).filter(
getattr(child_cls, self.value_attr) == val).first()
setattr(obj, self.target, o)
Thanks again Mike for your support.
--
Eric Lemoine
On Mon, Apr 16, 2012 at 10:49 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
Hi
I'd like to use an associationproxy for a simple many-to-one relationship:
class Child(Base):
__tablename__ = 'child'
id = Column(Integer, primary_key=True)
name = Column(Unicode)
class
On Fri, Apr 20, 2012 at 9:28 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Apr 20, 2012, at 8:45 AM, Eric Lemoine wrote:
On Mon, Apr 16, 2012 at 10:49 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
Hi
I'd like to use an associationproxy for a simple many-to-one relationship
is not the way
to go for that case.
Thanks for any suggestion.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed
On Thursday, March 8, 2012, Michael Bayer mike...@zzzcomputing.com wrote:
On Mar 8, 2012, at 7:28 AM, Eric Lemoine wrote:
On Thu, Mar 8, 2012 at 3:59 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
Hi
My code basically does:
---
engine = create_engine()
table = Table('table
. It's like table.create created a
transaction, and locked the table. Session.execute is blocked on this
lock.
I use Postgres. Any idea what I'm doing wrong?
Thank you.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail
On Tue, Feb 28, 2012 at 5:20 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
On Tue, Feb 28, 2012 at 4:46 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
wowwell yeah, though putting it in the column_info is not how i'd want
to do that. I'd like to change the API for 0.8
columns and generate the appropriate column_property() based on column type.
i'll look into that. Thanks a lot!
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
that gets sent to
mapper().
I guess you're referring to:
http://docs.sqlalchemy.org/en/latest/orm/examples.html#examples-declarative-reflection.
Iterate through the reflected table columns and generate the appropriate
column_property() based on column type.
--
Eric Lemoine
Camptocamp France
.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
a workaround, but which forces me to have my reflection code at
the application level as opposed to in GeoAlchemy.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http
On Thu, Jun 9, 2011 at 7:21 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 9, 2011, at 12:37 PM, Eric Lemoine wrote:
On Thu, Jun 9, 2011 at 6:28 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
That's the default adaption provided by TypeEngine.adapt(). Provide your
own
On Tue, Jun 14, 2011 at 3:46 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 14, 2011, at 3:17 AM, Eric Lemoine wrote:
Here's our TypeEngine:
So dialect-specific parameters are stored in self.kwargs.
I can try to add a test to SQLAlchemy if you indicate me where this
test should
On Thu, Jun 9, 2011 at 7:21 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 9, 2011, at 12:37 PM, Eric Lemoine wrote:
On Thu, Jun 9, 2011 at 6:28 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
That's the default adaption provided by TypeEngine.adapt(). Provide your
own
On Mon, Jun 6, 2011 at 9:47 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
Hi
i'm currently in the process of porting GeoAlchemy to SQLAlchemy 0.7.
The first issue I'm having is related to before_create and
after_create DDL listeners we have in GeoAlchemy.
We use before_create
On Thu, Jun 9, 2011 at 6:28 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 9, 2011, at 3:57 AM, Eric Lemoine wrote:
Hi
Here's another issue with porting GeoAlchemy to SQLAlchemy 0.7.
So GeoA defines a TypeEngine, which looks like this:
class Geometry(TypeEngine):
def
', target, connection)
def after_drop(self, target, connection, **kw):
self('after-drop', target, connection)
Thanks,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http
, but I'm wondering if that's the
proper way.
Thanks for any guidance on that,
PS: I was hoping to get inspiration from examples/postgis.py, but this
example looks outdated. Maybe it should be removed from the 0.7 code
base.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le
.
But aren't apps supposed to use =0.6.99 to avoid backward compats
issues? Apps that don't will also break when 0.7 final is on pypi.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http
On Tuesday, February 15, 2011, Tarek Ziadé ziade.ta...@gmail.com wrote:
On Tue, Feb 15, 2011 at 3:27 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote
..
But aren't apps supposed to use =0.6.99 to avoid backward compats
issues? Apps that don't will also break when 0.7 final is on pypi
Hi
Probably a very simple question. I use the ORM for inserts, with
postgres 8.3. How can I get the ids resulting from my inserts'
RETURNING clauses? I haven't been able to find the information in the
doc.
Thanks a lot,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le
On Tuesday, January 18, 2011, Eric Lemoine eric.lemo...@camptocamp.com wrote:
Hi
Probably a very simple question. I use the ORM for inserts, with
postgres 8.3. How can I get the ids resulting from my inserts'
RETURNING clauses? I haven't been able to find the information in the
doc.
Doing
On Tue, Jan 18, 2011 at 11:33 PM, Michael Bayer
mike...@zzzcomputing.com wrote:
On Jan 18, 2011, at 4:47 PM, Eric Lemoine wrote:
On Tuesday, January 18, 2011, Eric Lemoine eric.lemo...@camptocamp.com
wrote:
Hi
Probably a very simple question. I use the ORM for inserts, with
postgres 8.3
.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
Hello
For testing purposed I'd like to do query.all(). query.get() and
query.count() with no actual communication with the DBMS. Is this
possible?
Thanks a lot,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail
26.000,-120.000 43.833))
Your multipolygon WKT is ill-formed. Try with three opening and
closing brackets.
If that still doesn't work I suggest that we continue the discussion
on the GeoAlchemy list.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac
in the mapping.
To go from name_key, you could say
class_mapper(MyClass)._columntoproperty[t.c.name_key].
It's now clear. Thanks a lot.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http
?
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
')
try:
class_mapper(User).get_property('name_key')
except InvalidRequestError:
print error 1
try:
class_mapper(User).get_property('name')
except InvalidRequestError:
print error 2
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel
On Sun, May 30, 2010 at 6:20 PM, Lance Edgar lance.ed...@gmail.com wrote:
On 5/30/2010 9:43 AM, Eric Lemoine wrote:
On Sun, May 30, 2010 at 4:39 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
Hello
I use Pylons. Pylons does:
Session = scoped_session(sessionmaker
arguments (1 given).
Thanks a lot,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed to the Google Groups
On Sun, May 30, 2010 at 4:39 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
Hello
I use Pylons. Pylons does:
Session = scoped_session(sessionmaker())
and then:
Session.configure(bind=engine)
My question: with a reference to Session how can I get the engine
that's bound to it? I
Hi
Are there examples of using PostgreSQL's full-text search with
SQLAlchemy? I'm interested in any kind of information about that.
Thanks,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo
On Fri, May 28, 2010 at 3:12 PM, Michael Bayer mike...@zzzcomputing.com wrote:
we support the to_tsquery() syntax through the match() operator:
http://www.sqlalchemy.org/trac/browser/test/dialect/test_postgresql.py#L1748
Thank you very much.
--
Eric Lemoine
Camptocamp France SAS
Savoie
?
Thanks a lot,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group
. The
operator considers the blank characters as semantically insignificant
and remove them.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--
You received
On Thu, Jan 7, 2010 at 11:29 AM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
Hi
I'm having a problem with a query where the FROM clause doesn't
include a table that is actually required for the query.
Here's my code:
--
subq = subquery(None,
columns
result_process method doesn't seem to be called.
Is this expected? Do I have solutions to that problem?
Thanks a lot,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
On Tue, Sep 29, 2009 at 9:04 PM, Michael Bayer mike...@zzzcomputing.com wrote:
Eric Lemoine wrote:
Hi
Here's my case: I have
- my own TypeEngine class, MyTypeEngine
- a Table with a Column using MyTypeEngine:
table = Table(tablename, metadata,
Column(columname, MyTypeEngine
col1, col2, col3, FROM ...
And, as I said, I'd like this to be dynamic, so I don't want this to
be hardwired in my mapping definition. Is this possible?
Thanks a lot,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail
On Sunday, September 13, 2009, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 13, 2009, at 5:32 AM, Eric Lemoine wrote:
Hello list
I have a simple mapping between a class and a table. What I'd like to
be able to do is dynamically change the query selection (based on some
HTTP
/sqlalchemygeom.py
[4] http://trac.gispython.org/lab/wiki/Shapely
[5]
https://trac.mapfish.org/trac/mapfish/browser/trunk/MapFish/server/python/mapfish/lib/protocol.py
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail
()
session.query(Road).filter(Road.road_geom == 'LINESTRING(189412
252431,189631 259122)').one()
the GeomFromText function is called implicitly with the above
examples.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail
Eric, a friendly comment: you do sound as crazy as Svil :-)
Eric
2008/11/25, Eric Ongerth [EMAIL PROTECTED]:
Yes, I am very glad to be free of multiversion and bitemporal
concerns, although I will eventually be setting this up for partial
multimaster asynchronous replication (but with a lot
On Mon, Oct 20, 2008 at 7:46 PM, Michael Bayer [EMAIL PROTECTED] wrote:
its not a known issue but sounds like a bug. a very concise test
case which we can use as a unit test would help here.
I hope this is good enough:
from sqlalchemy import *
from sqlalchemy.orm import *
engine =
.
On Tuesday 21 October 2008 10:48:02 Eric Lemoine wrote:
On Mon, Oct 20, 2008 at 7:46 PM, Michael Bayer
[EMAIL PROTECTED] wrote:
its not a known issue but sounds like a bug. a very concise
test case which we can use as a unit test would help here.
I hope this is good enough:
from
Great. Thanks!
2008/10/22, Michael Bayer [EMAIL PROTECTED]:
I forgot to mention i fixed this for 0.4 + 0.5 in r5180/5181...thanks
for the test !
On Oct 21, 2008, at 3:48 AM, Eric Lemoine wrote:
On Mon, Oct 20, 2008 at 7:46 PM, Michael Bayer [EMAIL PROTECTED]
wrote:
its not a known
Hi
I use concrete inheritance with two tables. I therefore use
polymorphic_union. Each table has a Column object defined with a key:
Column(office_name, types.Unicode, key=name). And the key doesn't
work for the second table, the field name exists in the mapped
objects resulting from a query but
Will try
2008/10/20, Michael Bayer [EMAIL PROTECTED]:
its not a known issue but sounds like a bug. a very concise test
case which we can use as a unit test would help here.
On Oct 20, 2008, at 1:33 PM, Eric Lemoine wrote:
Hi
I use concrete inheritance with two tables. I therefore
Hi.
I just wanted to mention that we've been using 0.5 since the first
beta in our Pylons-based web-mapping framework (www.mapfish.org) and
it has given up entire satisfaction. We caricatuy use: regular CRUD
operations, type definition (for PostGIS' geometry column), and
concrete table
) and
use with_polymorphic on each request.
Is my understanding correct?
Eric
2008/8/31, Michael Bayer [EMAIL PROTECTED]:
On Aug 31, 2008, at 4:44 PM, Eric Lemoine wrote:
Hello
Here's my case. I have 3 tables, summits, parkings, and huts.
They all have an elevation column. And I want
Hello
Here's my case. I have 3 tables, summits, parkings, and huts.
They all have an elevation column. And I want to do queries like
that: the summits, parkings, and huts that are higher than 2000
meters, the summits that are lower than 1000 meters, the parkings
and huts that are between 500 and
Mike, a question related to you saying composites aren't a necessary
feature in the first place. Would it be possible using just Python
properties and synonym() to do something similar to the composites
example in the doc, namely query(Vertex).filter(Vertex.start ==
Point(3, 4))? Thanks. Eric
Just realized that my question is similar to az's :) Eric
2008/8/21, Eric Lemoine [EMAIL PROTECTED]:
Mike, a question related to you saying composites aren't a necessary
feature in the first place. Would it be possible using just Python
properties and synonym() to do something similar
Hello
I created my own type, Geometry, to deal with PostGIS' geometry column type.
class Geometry(TypeEngine):
def __init__(self, srid=-1, dims=2):
super(Geometry, self).__init__()
self.srid = srid
self.dims = dims
def get_col_spec(self):
return
Hello
When using autoload the created Numeric columns have asdecimal set to
True (I use postgres, dunno if it's different with other databases).
If would like that they have asdecimal set to False. Can I force that
without having to override the results of the autoload with explicit
Hello
Are there particular conditions for the autoload mechanism to discover
the primary key.
If I remove Line 12 of this code
http://paste.turbogears.org/paste/3183, I get this traceback
http://paste.turbogears.org/paste/3182.
Thanks a lot,
--
Eric
On Fri, Jul 11, 2008 at 11:00 PM, Michael Bayer
[EMAIL PROTECTED] wrote:
ive never observed a scenario where SQLA could not reflect the primary
key status of a column. Feel free to share wtih us what database
youre using and the exact DDL used to generate the table in question.
Well, the
Hello
To override attribute behavior the 0.5 doc gives this example:
class MyAddress(object):
def _set_email(self, email):
self._email = email
def _get_email(self):
return self._email
email = property(_get_email, _set_email)
mapper(MyAddress, addresses_table, properties =
On Mon, Jul 7, 2008 at 10:24 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Jul 7, 2008, at 3:29 PM, Eric Lemoine wrote:
Hello
To override attribute behavior the 0.5 doc gives this example:
class MyAddress(object):
def _set_email(self, email):
self._email = email
def
On Mon, Jul 7, 2008 at 11:51 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Jul 7, 2008, at 5:46 PM, Eric Lemoine wrote:
without synonym(), just add _email:addresses_table.c.email to your
mapper properties dict so that the email name is made available.
In that case, on DB read, SA will set
Hi. Currently sa does select after insert to get the new serial value?
Is my understanding correct? Thx
2008/6/7, Michael Bayer [EMAIL PROTECTED]:
On Jun 6, 2008, at 9:11 PM, Cliff Wells wrote:
Just an FYI, in PostgreSQL 8.2.4 they added a new feature returning
which can be used to avoid
Hello
Here's my thing:
I have two DB tables, refugees and offices, which are independent
tables (no foreign key). I already have two mappers for those tables:
mapper(Refugee, refugees_table)
mapper(Office, offices_table)
In addition to being able to do independent queries on each table, I'd
On Tue, May 6, 2008 at 4:24 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On May 6, 2008, at 7:49 AM, Eric Lemoine wrote:
Hello
Here's my thing:
I have two DB tables, refugees and offices, which are independent
tables (no foreign key). I already have two mappers for those
Thanks a lot. I'll try that
2008/5/6, Michael Bayer [EMAIL PROTECTED]:
On May 6, 2008, at 11:13 AM, Eric Lemoine wrote:
In the Concrete Table Inheritance example in the doc, there's an
employee table. In my case, there's no location table, and that's
why I haven't seen Concrete Table
On Tue, May 6, 2008 at 5:36 PM, Eric Lemoine [EMAIL PROTECTED] wrote:
Thanks a lot. I'll try that
It works great! I would never have found how to do it without support
from you Michael. The doc wasn't explicit enough for me to figure it
out by myself. But support on the mailing list is awesome
Michael, yes, i think the seq is automatically executed in that case.
Regarding the usage of currval i dunno. Sorry
2008/4/30, Michael Bayer [EMAIL PROTECTED]:
On Apr 30, 2008, at 3:45 PM, Eric Lemoine wrote:
With psycopg2, I know people using this:
sql = INSERT INTO \%s\ (%s) VALUES
Hello
I insert a new line in a table using this:
campfacility = Campfacility(prop1, prop2)
model.Session.save(campfacility)
model.Session.commit()
The campfacility id is handled by a postgres sequence.
What I'd like to do is:
campfacility = Campfacility(prop1, prop2)
seq =
On Wed, Apr 30, 2008 at 9:02 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 30, 2008, at 12:56 PM, Eric Lemoine wrote:
thread 1 thread 2
execute(seq) - nextid = n
execute(seq) - nextid = n
model.Session.save
On Wed, Apr 30, 2008 at 9:02 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 30, 2008, at 12:56 PM, Eric Lemoine wrote:
thread 1 thread 2
execute(seq) - nextid = n
execute(seq) - nextid = n
model.Session.save
On Wed, Apr 30, 2008 at 9:23 PM, Eric Lemoine [EMAIL PROTECTED] wrote:
On Wed, Apr 30, 2008 at 9:02 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 30, 2008, at 12:56 PM, Eric Lemoine wrote:
thread 1 thread 2
On Wed, Apr 30, 2008 at 9:44 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 30, 2008, at 3:23 PM, Eric Lemoine wrote:
Yes, the sequence is my table's PK. What I want to know is the PK
value of the line I'm going to insert (or I've just inserted). So I
guess this is indeed
Thanks Michael for the detailed explanations and the patch. This is
really helping!
2008/4/26, Michael Bayer [EMAIL PROTECTED]:
On Apr 25, 2008, at 4:21 PM, Eric Lemoine wrote:
Module sqlalchemy.orm.mapper:1198 in _postfetch
elif not c.primary_key and c.key in params and
self
Hello
I have the following code in my pylons app:
refugee = Refugee(value, geometry)
model.Session.save(refugee)
model.Session.commit()
Refugee is the class mapped to my Table object (refugees_table).
geometry is an instance of a custom type, for which I created a
Geometry(TypeEngine) class.
On Fri, Apr 25, 2008 at 5:55 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 25, 2008, at 11:37 AM, Eric Lemoine wrote:
Hello
I have the following code in my pylons app:
refugee = Refugee(value, geometry)
model.Session.save(refugee)
model.Session.commit
On Fri, Apr 25, 2008 at 8:48 PM, Eric Lemoine [EMAIL PROTECTED] wrote:
On Fri, Apr 25, 2008 at 5:55 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 25, 2008, at 11:37 AM, Eric Lemoine wrote:
Hello
I have the following code in my pylons app:
refugee
Hello
I'm trying to use the key argument in my mapping:
refugees_table = Table('refugee',
MetaData(config['pylons.g'].sa_unhcr_webgis_engine),
Column('refugee_fid', types.Integer, primary_key=True),
Column('id', types.Float, key='_id'),
autoload=True,
schema='hqmap')
But I
On Mon, Apr 21, 2008 at 10:37 AM, Eric Lemoine [EMAIL PROTECTED] wrote:
Hello
I'm trying to use the key argument in my mapping:
refugees_table = Table('refugee',
MetaData(config['pylons.g'].sa_unhcr_webgis_engine),
Column('refugee_fid', types.Integer, primary_key=True
On Mon, Apr 21, 2008 at 5:17 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 21, 2008, at 4:37 AM, Eric Lemoine wrote:
Hello
I'm trying to use the key argument in my mapping:
refugees_table = Table('refugee',
MetaData(config['pylons.g'].sa_unhcr_webgis_engine
Hello
Have a question related to mapped objects and reflecting tables.
If have this simple configuration:
messages = Table('messages', meta, autoload=True)
class Message(object):
pass
mapper(Message, messages)
Given a Message object, do I have a way to retrieve all the attributes
that
On 11/5/07, Paul Johnston [EMAIL PROTECTED] wrote:
Hi,
Given a Message object, do I have a way to retrieve all the attributes
that result from the database mapping?
Try this:
for col in Message.c:
It works. thanks a lot Paul,
--
Eric
Hi
I use a reflected table with an overriden column:
summits_table = Table('sommets_out',
MetaData(config['pylons.g'].sa_search_engine),
Column('geom', Geometry),
autoload=True)
and I get RuntimeWarning when accessing the table:
On 10/10/07, Michael Bayer [EMAIL PROTECTED] wrote:
On Oct 10, 2007, at 10:01 AM, Eric Lemoine wrote:
Hi
I use a reflected table with an overriden column:
summits_table = Table('sommets_out',
MetaData(config['pylons.g'].sa_search_engine),
Column('geom
1 - 100 of 101 matches
Mail list logo