I use ENUM types for postgres. Reflection does not preserve the ENUM name
within its sequence. Name is required on postgres. I don't want to edit my
50+ tables and add names to them just for a migration, this is why
reflection does not work in my case.
--
Thadeus
On Mon, Dec 6, 2010 at 4:29 PM
Thank you! Ticket for doc addition: http://www.sqlalchemy.org/trac/ticket/1994
On Dec 6, 6:10 pm, Michael Bayer wrote:
> specify implicit_returning = False as part of the Table arguments. Should
> probably add a note to the MSSQL docs on this.
>
> On Dec 6, 2010, at 5:41 PM, Randy Syring wrot
specify implicit_returning = False as part of the Table arguments. Should
probably add a note to the MSSQL docs on this.
On Dec 6, 2010, at 5:41 PM, Randy Syring wrote:
> I am executing a bulk insert which is resulting in SQL like:
>
> INSERT INTO equipment (equipment_type_id, number, mark,
I am executing a bulk insert which is resulting in SQL like:
INSERT INTO equipment (equipment_type_id, number, mark, inactive)
OUTPUT inserted.id VALUES (?, ?, ?, ?)' (6, u'1', None, 0)
But I have a trigger on equipment that does some validity checking.
When executing, I get an exception whic
On 03/12/2010 19:02, Thadeus Burgess wrote:
I'm about to use sqlalchemy-migrate, however all of my tables are
already in a declarative format.
If you're using migrate, you're better off reflecting the tables to be
migrated rather than using any script to try and turn declarative models
into t
Thank you! I never would have thought of appending a superclass as an
alternative to subclassing or monkeypatching. No wonder Python is so
hard to optimize. I wound up doing the monkey patch and it seems to
work just fine.
--
You received this message because you are subscribed to the Google Grou
thanks I've updated ticket 1991 with this patch.
On Dec 6, 2010, at 3:44 PM, Evax Software wrote:
> Hi,
>
> The following patch replaces the previous one with the fix mentioned
> in the previous thread included.
> It also fixes the test cases to handle pymysql properly (that is
> exactly as MyS
On Dec 6, 2010, at 3:29 PM, Daniel Holth wrote:
> I am trying to subclass a mapped class from another package for no
> other reason than to add a utility method. The polymorphic_on
> condition, if it were defined, would have to be 'True'. Example:
>
> class Mapped(declarative_base()):
> # colu
On Dec 6, 2010, at 2:39 PM, Alvaro Reinoso wrote:
> Hi all,
>
> I have those two classes:
>
> class Playlist(rdb.Model):
> """Represents playlist. It may contain playlist items"""
> rdb.metadata(metadata)
> rdb.tablename("playlists")
>
> id = Column("id", Integer, prima
mapper has an "order_by" argument which is used to establish the default
ordering when Query is used. Mapper configuration with declarative is via the
__mapper_args__ dictionary. Both concepts are described in
http://www.sqlalchemy.org/docs/orm/mapper_config.html .
On Dec 6, 2010, at 9:09
On Dec 6, 2010, at 10:31 AM, Ian Thompson wrote:
> Hi,
>
> Apologies if this has been answered or doesn't make sense, I'm still
> just getting started here.
>
> Passing in an association proxy to the joinedload function doesn't
> seem to work, I have to use the original name. Is this the expect
Nothing gets placed in the Session initially without at least one call to
add().When an object is added which contains references to other objects,
or other objects are associated with an object already present in the session,
cascade rules take effect which result in those related objects
Hi,
The following patch replaces the previous one with the fix mentioned
in the previous thread included.
It also fixes the test cases to handle pymysql properly (that is
exactly as MySQLdb) as well as a small typo in Saint Exupéry's
snippet :)
As the google groups web interface will probably man
columns participate in the SQL rendition of a query as they are used within the
filter(), group_by(), order_by(), and other similar generative methods on
Query. There is no additional step needed.
If the columns are owned by a table that is not currently participating in the
query, the owning
I am trying to subclass a mapped class from another package for no
other reason than to add a utility method. The polymorphic_on
condition, if it were defined, would have to be 'True'. Example:
class Mapped(declarative_base()):
# columns
class Utility(Mapped):
def is_something(self):
Hi all,
I have those two classes:
class Playlist(rdb.Model):
"""Represents playlist. It may contain playlist items"""
rdb.metadata(metadata)
rdb.tablename("playlists")
id = Column("id", Integer, primary_key=True)
title = Column("title", String(50))
On Dec 6, 2010, at 10:50 AM, M3nt0r3 wrote:
> HI,
> i am trying to handle the error c on connection when db is stopped or
> unrechable.
>
>File "/usr/lib/python2.6/dist-packages/sqlalchemy/pool.py", line
> 213, in __init__
>self.connection = self.__connect()
>
>File "/usr/lib/python
On Dec 6, 2010, at 11:52 AM, Ian Thompson wrote:
> On Dec 6, 4:49 pm, Ian Thompson wrote:
>> I've generated a test data set and then want to have all of the
>> created objects and relationships available for reference easily.
>> To avoid possible pollution of this fixture I want to detach the
>>
On Dec 6, 4:49 pm, Ian Thompson wrote:
> I've generated a test data set and then want to have all of the
> created objects and relationships available for reference easily.
> To avoid possible pollution of this fixture I want to detach the
> objects from the sessions to avoid them getting any upda
I've generated a test data set and then want to have all of the
created objects and relationships available for reference easily.
To avoid possible pollution of this fixture I want to detach the
objects from the sessions to avoid them getting any updates applied.
To do this I am attempting to load
HI,
i am trying to handle the error c on connection when db is stopped or
unrechable.
File "/usr/lib/python2.6/dist-packages/sqlalchemy/pool.py", line
213, in __init__
self.connection = self.__connect()
File "/usr/lib/python2.6/dist-packages/sqlalchemy/pool.py", line
279, in __connect
Hi,
Apologies if this has been answered or doesn't make sense, I'm still
just getting started here.
Passing in an association proxy to the joinedload function doesn't
seem to work, I have to use the original name. Is this the expected
behaviour or am I doing something stupid?
class SomeTable
hi,
how can I specify the default ordering of a declaratively given table?
Viktor
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sq
Hi,
I sometimes see this type of error:
Traceback (most recent call last):
File "dialognewwine.pyo", line 750, in OnSaveButton
File "dialognewwine.pyo", line 768, in SaveData
File "sqlalchemy\orm\session.pyo", line 924, in refresh
File "sqlalchemy\orm\session.pyo", line 1234, in _valida
24 matches
Mail list logo