Michael Bayer wrote:
i suppose the advantage over a separate primary key / foreign key in
the child table is that it enforces a one-to-one mapping ?
Yep - it's one of the things I really like in SA c.f. SQLObject which forced you
to use internal primary keys (or at least it did, haven't che
i suppose the advantage over a separate primary key / foreign key in
the child table is that it enforces a one-to-one mapping ?
On Mar 1, 2006, at 7:54 PM, Robert Leftwich wrote:
Michael Bayer wrote:
just curious, why would a primary key column want to be a foreign
key as well ? seems a
Michael Bayer wrote:
just curious, why would a primary key column want to be a foreign key
as well ? seems a little denormalized to me.
Composite/bridge entities in m:n relationships.
Robert
---
This SF.Net email is sponsored by xPML, a g
just curious, why would a primary key column want to be a foreign key
as well ? seems a little denormalized to me.
On Mar 1, 2006, at 7:36 PM, Robert Leftwich wrote:
Marko Mikulicic wrote:
if column.primary_key and isinstance(column.type, types.Integer)
and (column.default is None or (isi
Marko Mikulicic wrote:
if column.primary_key and isinstance(column.type, types.Integer) and
(column.default is None or (isinstance(column.default, schema.Sequence)
and column.default.optional)):
colspec += " SERIAL"
In addition, this has the same issue as autoincrement in mysql, i.e. it
"optional" is a funny little flag i should change the name of, it
essentially means "use this Sequence only if the database *requires*
an explicit sequence to be created", which at the moment is only
Oracle. so "optional" should really be called "only_if_required" or
something like that.
I don't understand this default behaviour in postgres.py:
if column.primary_key and isinstance(column.type, types.Integer) and
(column.default is None or (isinstance(column.default,
schema.Sequence) and column.default.optional)):
colspec += " SERIAL"
more specifically the "isinstance(colum
7 matches
Mail list logo