You should at least create a small test of the same segment of the model using 
the declarative style, to narrow down what's going wrong and at least ensure it 
works structurally. 

Sent from my iPhone

On Feb 17, 2012, at 11:14 AM, "Jakob D." <[email protected]> wrote:

> The inverse thing was just something I tried to solve this.
> 
> But I removed them and tried different ways of specifying use_alter and 
> post_update according to: 
> http://elixir.ematia.de/apidocs/elixir.relationships.html
> 
> This is getting ridiculous though, I even removed all of the relationships 
> except for client and I still get the same error:
> 
> 
> class Project(Entity):
>       id                      = Field(String(100), primary_key=True)
>       client          = ManyToOne('User', post_update=True, 
> inverse='owned_projects')
>       creator_name = Field(String(80))
>       
>       @Property
>       def creator():
>       
>               def fget(self):
>                       return User.get_by(username=self.creator_name)
>       
>               def fset(self, value):
>                       if isinstance(value, User):
>                               self.creator_name = value.name
>       
>               return locals()
>       
> class User(Entity):
>       username         = Field(String(80),  primary_key=True)
>       project_id = Field(String(100))
> 
> 
>       @Property
>       def assigned_project():
> 
>               def fget(self):
>                       return Project.get_by(id=self.project_id)
> 
>               def fset(self, value):
>                       if isinstance(value, Project):
>                               self.project_id = value.id
> 
>               return 
> 
> I wish I could try the SQLAlchemy way of doing this, but I'd have to redo the 
> tables since I read that you cannot mix the both on the same table.
> 
> Now I obviously only have one relation between the two tables, when setting 
> the project for a user, I don't see how it would cause a 
> CircularDependencyError.
> 
> I've checked different relations even though it shouldn't matter. And they 
> seem ok, no circular dependencies. 
> 
> Any other ideas? 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/sqlalchemy/-/Z-kuaTHBrP8J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to