On 07/04/2012 17:29, Julien Cigar wrote:
On 07/04/2012 16:38, Michael Bayer wrote:
On Jul 4, 2012, at 9:16 AM, Julien Cigar wrote:
Hello,
I have a rather strange CircularDependencyError with the following
use-case:
- I have a content table and a data table.
- content is mapped with
Hello,
I have a rather strange CircularDependencyError with the following use-case:
- I have a content table and a data table.
- content is mapped with Content and data is mapped with File.
- File is a Content (joined table inheritance), so File has a foreign
key to Content (through the
On Jul 4, 2012, at 9:16 AM, Julien Cigar wrote:
Hello,
I have a rather strange CircularDependencyError with the following use-case:
- I have a content table and a data table.
- content is mapped with Content and data is mapped with File.
- File is a Content (joined table inheritance),
On 07/04/2012 16:38, Michael Bayer wrote:
On Jul 4, 2012, at 9:16 AM, Julien Cigar wrote:
Hello,
I have a rather strange CircularDependencyError with the following use-case:
- I have a content table and a data table.
- content is mapped with Content and data is mapped with File.
- File is a
you need to use the post_update option described at
http://docs.sqlalchemy.org/en/rel_0_7/orm/relationships.html#rows-that-point-to-themselves-mutually-dependent-rows
.
On Jun 6, 2012, at 1:15 AM, Alex Grönholm wrote:
I have trouble configuring two relationships from one class to another. The
06.06.2012 18:06, Michael Bayer kirjoitti:
you need to use the post_update option described at
http://docs.sqlalchemy.org/en/rel_0_7/orm/relationships.html#rows-that-point-to-themselves-mutually-dependent-rows
.
Thanks for the pointer. Problem solved :)
On Jun 6, 2012, at 1:15 AM, Alex
I have trouble configuring two relationships from one class to another. The
following code should be fairly self-explanatory:
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class Company(Base):
Thanks Michael. As always I appreciate the support here.
I'll try it out. It might actually be faster to redo these two tables in
the model in plain SQLAlchemy than trying to figure out what's wrong with
the current one.
And, uhm, there is no difference between user_account and workers. I
also in 0.8 I'm definitely going to make it so that primaryjoin thing isn't
needed for this kind of case, foreign_keys=foo.id will be enough, see
http://www.sqlalchemy.org/trac/ticket/2411 .
On Feb 18, 2012, at 7:30 AM, Jakob D. wrote:
Thanks Michael. As always I appreciate the support here.
Awesome =)
Your example definitely works.
But given my nature, I cannot leave things like this unanswered. So I took
a few steps back and debugged some more.
I removed a few fields from the model and added them one by one with
elixir. When using reverse I actually had to specify the field on
The following gives CircularDependencyError
where I think there isn't, but you know I don't know that much the internals
of SQLAlchemy and maybe (and it is a strong possibility) I'm wrong. I've
ripped of the classes causing the error (copy/paste will re-produce the
error).
from sqlalchemy import
On Sep 7, 2011, at 12:36 PM, Erkan Özgür Yılmaz wrote:
The following gives CircularDependencyError
where I think there isn't, but you know I don't know that much the internals
of SQLAlchemy and maybe (and it is a strong possibility) I'm wrong. I've
ripped of the classes causing the error
Oh, that worked very well, thank you very much...
E.Ozgur Yilmaz
Lead Technical Director
eoyilmaz.blogspot.com
On Wed, Sep 7, 2011 at 8:04 PM, Michael Bayer mike...@zzzcomputing.comwrote:
On Sep 7, 2011, at 12:36 PM, Erkan Özgür Yılmaz wrote:
The following gives CircularDependencyError
Hi again, sorry for flooding with email this week...
I stumbled on the CircularDependencyError in some occasions with self
referencing models. I do understand that it can be tricky to INSERT and DELETE
but I'm just updating rows.
I reduced my problem to the bare minimum. It works both on 0.5.8
need a full test case. Here's yours, runs fine:
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import *
from sqlalchemy.types import *
from sqlalchemy.orm import *
Base = declarative_base()
e = create_engine('sqlite://', echo=True)
Base.metadata.bind = e
sess =
of course you'll get a cycle if you do this, though:
s1 = School(cod=S1, cod_riferimento=S1, cliente=False)
d1 = School(cod=D1, cod_riferimento=S1, cliente=False)
s1.sedi = [s1, d1]
s1-s1 is not supported by self referential flushes, unless you put
post_update=True on the relation() you have
Hello,
I have tables: Users Departments. (SQlite)
Each User is assigned to one Department. (User.dept_id =
Department.id )
Now, I want to make once User in each Dept the default user.
As in:
Department.default_user_id = User.id
i.,e. Column('default_user_id', ForeignKey('users.id'))
17 matches
Mail list logo