But I'm supposed that the generation function of autoincrement only
works when the field is NULL or there is an integer, so this fails on
fields with a string empty.
On Jul 7, 8:06 am, Kless [EMAIL PROTECTED] wrote:
Yes, I read it. The integer columns with the primary key flag set
are not
Hi,
I'm having trouble using entity_name.
I have two mappers for the same class, one of them having an
entity_name=legacy.
If I do a query with the legacy mapper, I cannot figure how to
filter on properties. Ex:
session.query(MyClass, entity_name='legacy').filter(
Hi.
I'm having strange problems when I execute a SHOW command with PostgreSQL.
from sqlalchemy import create_engine, sql, __version__
print __version__
URL = 'postgres://xxx:[EMAIL PROTECTED]/xxx'
db = create_engine(URL, echo=True)
conn = db.connect()
query = sql.text('SHOW CLIENT_ENCODING')
Thanks Mike!
Your last suggestion was the best (ans easiest) solution, I guess I
just needed someone to point that out to me ;-) Since I want the whole
transaction to either succeed or fail, there's no need to use
SAVEPOINTs.
Cheers, Simon
On 3 Jul., 19:55, Michael Bayer [EMAIL PROTECTED]
Manlio Perillo ha scritto:
Hi.
I'm having strange problems when I execute a SHOW command with PostgreSQL.
from sqlalchemy import create_engine, sql, __version__
print __version__
URL = 'postgres://xxx:[EMAIL PROTECTED]/xxx'
db = create_engine(URL, echo=True)
conn = db.connect()
query
MyBase = type(MyBase, (Base, MyMixin), {})
Is this any different than just doing
class MyBase(Base, MyMixin): pass
?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group,
On Jul 7, 2008, at 3:06 AM, Kless wrote:
Yes, I read it. The integer columns with the primary key flag set
are not being autoincremented, after of the Column subclass.
what database ? Oracle and Firebird require a Sequence to be specified.
On Jul 7, 2008, at 3:10 AM, Kless wrote:
But I'm supposed that the generation function of autoincrement only
works when the field is NULL or there is an integer, so this fails on
fields with a string empty.
im not sure offhand what an empty string would produce since I'd have
to check
Yes, it's SQLite. I use it into the development.
On Jul 7, 4:06 pm, Michael Bayer [EMAIL PROTECTED] wrote:
On Jul 7, 2008, at 3:10 AM, Kless wrote:
But I'm supposed that the generation function of autoincrement only
works when the field is NULL or there is an integer, so this fails on
It's currently preferred if you didn't use entity_name since it works
quite poorly and even worse in 0.5, and we'd like to remove it - it
has built-in undefined behavior in that its not determined which set
of attribute instrumentation gets applied to the class.
This feature is an artifact
Glauco ha scritto:
Manlio Perillo ha scritto:
Hi.
I'm having strange problems when I execute a SHOW command with PostgreSQL.
from sqlalchemy import create_engine, sql, __version__
print __version__
URL = 'postgres://xxx:[EMAIL PROTECTED]/xxx'
db = create_engine(URL, echo=True)
conn =
then its probably inserting your blank string into the column. SQLA
doesn't want to get too much in the way of the natural features of
the database in use.
On Jul 7, 2008, at 11:09 AM, Kless wrote:
Yes, it's SQLite. I use it into the development.
On Jul 7, 4:06 pm, Michael Bayer
On Monday 07 July 2008 18:10:19 Michael Bayer wrote:
It's currently preferred if you didn't use entity_name since it
works quite poorly and even worse in 0.5, and we'd like to remove
it - it has built-in undefined behavior in that its not determined
which set of attribute instrumentation gets
You have reason. I checked it with MySQL and it works ok.
So here I have a lesson learned: use the same RDBMS on developing.
Thanks Michael.
On Jul 7, 4:50 pm, Michael Bayer [EMAIL PROTECTED] wrote:
then its probably inserting your blank string into the column. SQLA
doesn't want to get too
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 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 _get_email(self):
return self._email
email = property(_get_email,
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 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 _email directly and won't go
through _set_email(). Is that correct?
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
19 matches
Mail list logo