> The order is determined by the order in which the actual Column constructor
> is called, and an ordering token is applied. When a mixin is used, the
> Column is copied from the mixin, but it's likely that the ordering token is
> preserved. You'd declare them on Foo directly without using
On Jul 21, 2011, at 4:07 PM, Hans-Martin v. Gaudecker wrote:
> Hi,
>
> I am creating a bunch of columns by means of the declared_attr decorator
> since many of them contain foreign keys. Similar to the issue in this thread
> [1] from a year ago, it seems that the column order is not preserved
Hi,
I am creating a bunch of columns by means of the declared_attr decorator since
many of them contain foreign keys. Similar to the issue in this thread [1] from
a year ago, it seems that the column order is not preserved. To shamelessly
borrow the example from that thread, when doing:
clas
On Jul 21, 2011, at 10:48 AM, Michael Bayer wrote:
>
> On Jul 21, 2011, at 2:11 AM, Fayaz Yusuf Khan wrote:
>
>> Hi,
>> I have this declarative table model:
>> http://paste.pound-python.org/show/9857/
>
> The short answer is you can't do it that way right now. The "user" and
> "timestamp" c
On Jul 21, 3:35 pm, Conor wrote:
>
> It means that there is a Child row already in the database with
> parent_id=1234. When you reassign p.children to not include that child,
> SQLAlchemy detects that the child object is now an orphan (has no
> parent). Based on your cascade rules (cascade="all"),
On Jul 21, 2011, at 2:11 AM, Fayaz Yusuf Khan wrote:
> Hi,
> I have this declarative table model:
> http://paste.pound-python.org/show/9857/
The short answer is you can't do it that way right now. The "user" and
"timestamp" columns of C can't get assigned to the Table by declarative because
On 07/21/2011 09:20 AM, Ben Sizer wrote:
> I have 2 classes:
>
> Base = declarative_base()
>
> class Parent(Base):
> __tablename__ = 'parent'
> id = Column(Integer, primary_key=True)
> children = relationship("Child", cascade="all")
>
> class Child(Base):
>
I have 2 classes:
Base = declarative_base()
class Parent(Base):
__tablename__ = 'parent'
id = Column(Integer, primary_key=True)
children = relationship("Child", cascade="all")
class Child(Base):
__tablename__ = 'child'
id = Column(Integer, prim