On 17 Cze, 16:20, Michael Bayer mike...@zzzcomputing.com wrote:
I usually just turn expire_on_commit = False. But note also if you just
want to do a get(), the actual PK is always present in the key, which is
instance_state(myinstance).key[1].
I do want rest of the attributes to
Hi,
I've attached a tiny patch which adds support for index specification
like this:
sqlalchemy.schema.Index('ix_name', 'column', postgresql_ops = {'column':
'text_pattern_ops'})
resulting in:
ix_name btree (column text_pattern_ops)
Operator classes for indexes are documented here:
Hi, I want to remove an association in many to many relation, but I
don't want delete the related objects, just the association.
If I have:
ProjectUser = Table('PROJECT_USER', metadata,
Column('id_user', Integer, ForeignKey('USER.id_user')),
Column('id_project',Integer,
On Jun 20, 2011, at 3:18 AM, Maciej Szumocki wrote:
On 17 Cze, 16:20, Michael Bayer mike...@zzzcomputing.com wrote:
I usually just turn expire_on_commit = False. But note also if you just
want to do a get(), the actual PK is always present in the key, which is
OK maybe a quick test for test/dialect/test_postgresql.py , also does the way
the string is being formatted there change the look of existing Index
constructs (extra space ?)
If you can post as a ticket at http://www.sqlalchemy.org/trac/newticket (log in
as guest/guest) else i'll almost
On Jun 20, 2011, at 1:02 AM, Carlos Mendoza wrote:
Hi, I want to remove an association in many to many relation, but I
don't want delete the related objects, just the association.
If I have:
ProjectUser = Table('PROJECT_USER', metadata,
Column('id_user', Integer,
looks good, we have ticket http://www.sqlalchemy.org/trac/ticket/2193 to
discuss what we're doing here, ill attach there.
On Jun 20, 2011, at 12:42 AM, Eric Lemoine wrote:
On Thu, Jun 9, 2011 at 7:21 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Jun 9, 2011, at 12:37 PM, Eric
On Jun 19, 2011, at 6:16 PM, Filip Zyzniewski - Tefnet wrote:
Hi,
another day and another challenge :).
Somehow SQLAlchemy has a problem determining what to join when using
concatenation of columns.
this: session.query(Locality.name, Street.name).join(Street.locality)
properly
On Jun 20, 2011, at 10:16 AM, Michael Bayer wrote:
On Jun 19, 2011, at 6:16 PM, Filip Zyzniewski - Tefnet wrote:
Hi,
another day and another challenge :).
Somehow SQLAlchemy has a problem determining what to join when using
concatenation of columns.
this:
I have a (deep) tree structure
main
area
category
criteria
inputs
all tables with one_to_many relationships except criteria - inputs
which is many_to_many.
I need to set up a relationship for `main` as list of all distinct
inputs of its sub-sub-sub-criteria as in this query:
Hi All,
I have the following table:
CREATE TABLE `ip` (
`email` varchar(50) NOT NULL,
`ip` varchar(15) NOT NULL,
PRIMARY KEY (`email`,`ip`),
)
...which I'm looking to map to the following class:
class User:
def __init__(self,email,*ips):
self.email=email
self.ips = ips
So,
On Jun 20, 2011, at 12:21 PM, Chris Withers wrote:
Hi All,
I have the following table:
CREATE TABLE `ip` (
`email` varchar(50) NOT NULL,
`ip` varchar(15) NOT NULL,
PRIMARY KEY (`email`,`ip`),
)
...which I'm looking to map to the following class:
class User:
def
On 20/06/2011 17:27, Michael Bayer wrote:
So, multiple rows in the `ip` table end up mapping to a single user objects.
(ie: I end up with a sequence of ip addresses on user object)
How do I do it?
I would likely just map traditionally and have User be a non-mapped proxy object to a
On Jun 20, 2011, at 12:37 PM, Chris Withers wrote:
On 20/06/2011 17:27, Michael Bayer wrote:
So, multiple rows in the `ip` table end up mapping to a single user
objects. (ie: I end up with a sequence of ip addresses on user object)
How do I do it?
I would likely just map traditionally
Hello!
I would like to dynamically set/change the table that is mapped in my
python object, as instantiated through the declarative style.
class Feature(Base, GeometryTableMixIn):
this is dynamically created to use a table and pk_column
determined at runtime
__table_args__ = {
Wow somebody already brought this to light!
http://stackoverflow.com/questions/2768607/dynamic-class-creation-in-sqlalchemy
On Jun 20, 11:36 am, Cody Django codydja...@gmail.com wrote:
Hello!
I would like to dynamically set/change the table that is mapped in my
python object, as
Thanks, works great!!!
On Jun 20, 10:06 am, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 20, 2011, at 1:02 AM, Carlos Mendoza wrote:
Hi, I want to remove an association in many to many relation, but I
don't want delete the related objects, just the association.
If I have:
17 matches
Mail list logo