FWIW, I just committed a modified version of your patch to trunk
(r515). Also see my comments on the ticket.

On Tue, Aug 25, 2009 at 18:04, Johannes Janssen
<[email protected]> wrote:
>
> Gaetan de Menten schrieb:
>>> Also think of the problem, that if the resolve_root is defined on
>>> collection basis, you can never "break out" using absolute path.
>>>
>>
>> I thought at first that it was a feature, rather than a problem... But
>> on second thoughts, it might be a problem indeed. Let us imagine we
>> are in the following setup: all your project entities are define in a
>> "db" module, but you also use TurboGears (or whatever external
>> library/framework which provides some elixir entities) and its
>> provided "User" entity. Just because of that one entity, you couldn't
>> use the module_root option which would otherwise make a lot of sense.
>>
>> I still don't like the per-entity module_root option, because inside
>> the entity using it (to set the module_root to None), you'd have to
>> use absolute paths (or relative paths) for all the relationships, and
>> not just the one needing to "break out". As a solution to this, it
>> *might* be a good idea to add a mechanism to "force" absolute paths,
>> even when the module_root is not None, for example by using a leading
>> "/", as in "/turbogears.identity.User" (or whatever the real path is).
> I personally would prefer that paths, that start with "__main__" are
> always treated as "real" absolute path, ignoring the "chroot" done by
> module_root option.
>
> Please ignore my yesterday's patch it's buggy. At the moment I'm working
> on a new patch, to implemented the discussed features and give back
> better error messages. I'm wondering if the entity argument to the
> resolve function really has to be optional, as it is in the original
> function. This blows up code quite a lot. When you want to give back as
> much information  as available in the error messages, you have to check
> whether there was an entity provided or not.
>
> Johannes
>
> >
>



-- 
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