On Sun, Mar 22, 2009 at 01:41, Danny W. Adair <[email protected]> wrote:

> (Sorry I couldn't figure out how to register for trac issue creation.)

You can't register yourself, but you can report issues as "guest/guest".

> Trying to use Entity.to_dict() I've noticed that anything in "deep"
> will be recursively be to_dict'()ed which breaks if it happens to be
> None. I think it's more useful to allow the entries in "deep" to
> either be an Entity or None. I want to to_dict() a relationship only
> _if_ it is set.

That was an oversight. I've just fixed it in trunk (r448). Thanks for
reporting this.

> Also:
> - Is there a simple way to build that "deep" tree automatically from
> my model, if I happen to want to resolve _all_ ManyToOne and OneToOne
> relationships in the entity? I don't have circular problems and just
> want "all".

Not that I know of. It's not particularly hard to do though.
Introducing such behavior *might* be a good idea. Maybe if "deep ==
True". What do people think about this?

> - It would be nice if entities resolved through "deep" had their
> corresponding (fk) ids removed.

This could be interesting as an option (and which should default to
"off" IMO). Patch welcome ;-).

> - Couldn't "exclude" be a nested dict like "deep", rather than a list?

This makes a lot of sense. The current behavior is broken and we
should indeed add a mechanism to specify "deep" excludes. Patch
welcome too...

> (and just extended with the remote_side stuff)

I'm not sure I understand what you mean here...

-- 
Gaƫtan de Menten
http://openhex.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to