cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
Subject Re: @SortWeight annotation
Date Fri, 22 Jul 2011 12:00:06 GMT
Looks like I was right.  One of my co-workers just IM'ed me about
another "Can't extract a master key." error.  I'm going to start
another thread about Ashwood ...

Thanks,

mrg


On Fri, Jul 22, 2011 at 7:57 AM, Michael Gentry <mgentry@masslight.net> wrote:
> Hi Andrus,
>
> The @SortWeight seems to be working, at least in my limited tests.
> I'm concerned that it is too easy to weight it into the wrong place
> and introduce another incompatibility.  It almost seems like an
> @DependsUpon(XYZ.class) would be a better approach.  Then move the
> sort weight of the class that depends upon XYZ to be higher than XYZ.
> Thoughts?
>
> Thanks,
>
> mrg
>
>
> On Wed, Jul 20, 2011 at 9:36 AM, Andrus Adamchik <andrus@objectstyle.org> wrote:
>> Hi Michael,
>>
>> This is pretty straightforward. Here is an example:
>>
>> // create custom module:
>> class CayenneExtrasModule implements Module {
>>
>>        @Override
>>        public void configure(Binder binder) {
>>                binder.bind(EntitySorter.class).to(WeightedAshwoodEntitySorter.class);
>>        }
>> }
>>
>> // use it when creating Cayenne runtime:
>> ServerRuntime runtime = new ServerRuntime("cayenne-xyz.xml", new CayenneExtrasModule());
>>
>>
>> Andrus
>>
>>
>>
>> On Jul 20, 2011, at 4:26 PM, Michael Gentry wrote:
>>
>>> Hi Andrus,
>>>
>>> Since I'm completely new to the DI stuff in 3.1, how do I install the
>>> WeightedAshwoodEntitySorter in the DI container?
>>>
>>> Thanks,
>>>
>>> mrg
>>>
>>>
>>> On Wed, Jul 13, 2011 at 12:19 PM, Andrus Adamchik
>>> <andrus@objectstyle.org> wrote:
>>>> @SortWeight may help (unless the cycle is between the objects of the same
type). You will need to install WeightedAshwoodEntitySorter in the DI container to take advantage
of it.
>>>>
>>>
>>
>>
>

Mime
View raw message