cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eshan Sudharaka <esudhar...@gmail.com>
Subject Re: Regarding CAY-1714
Date Wed, 18 Jul 2012 14:52:14 GMT
Hi,

Or should it be handle in resolveFromDB method in RelationshipFault class ?

On Wed, Jul 18, 2012 at 3:10 PM, Eshan Sudharaka <esudharaka@gmail.com>wrote:

> Hi,
>
> I have gone through the method invocations of this issue.  As mentioned in
> jira task reason for this is that the parent context is not being committed
> when last statement is executing.(childMt2.getTable3();)
>
> As I see We need  handle this in BaseContext.prepareForAccess method.
> Inside that we can check objectContext.hasChanges(); boolean value and if
> it is false only we can continue that flow.  Could you please provide me a
> feed back for this approach
>
>
>
> On Mon, Jul 16, 2012 at 5:12 PM, Andrus Adamchik <andrus@objectstyle.org>wrote:
>
>> Yes, the API would be the same...
>>
>> But good point on usability. We had rather transparent API before, and
>> then replaced it with what we have now :)
>>
>> The reason for this change was to avoid storing context factory and any
>> other stack singletons in an ObjectContext instance (be it DataContext or
>> CayenneContext). As ObjectContext is serializable, having lots of extra
>> "services" as ivars made bootstrapping it back to the stack on
>> deserialization a rather painful operation. So in order to streamline that
>> process, some of the earlier conveniences were sacrificed.
>>
>> If you think of CayenneRuntime as a "factory of everything" it may not
>> look so confusing actually... Also maybe we can add a convenience method
>> CayenneRuntime.getContext(ObjectContext) to avoid a cast.
>>
>> Also "getContext(DataChannel)" javadoc is mindlessly cloned from
>> "getContext()" without explaining the difference and needs to be fixed :)
>>
>> Andrus
>>
>>
>> On Jul 16, 2012, at 2:28 PM, Dzmitry Kazimirchyk wrote:
>>
>> > What about next level of nesting...
>> >
>> > ObjectContext nestedChild = runtime.getContext((DataChannel)
>> clientContextChild);
>> >
>> > This approach doesn't seem handy or obvious. Is there a better way?
>> >
>> > Dima
>> >
>> >
>> > On 07/16/2012 02:11 PM, Andrus Adamchik wrote:
>> >> The API was refactored, but the nested contexts feature is of course
>> still present. Right now you'd create a client nested context using
>> ClientRuntime:
>> >>
>> >> ClientRuntime runtime = ..
>> >> ObjectContext clientContextChild = runtime.getContext(clientContext);
>> >>
>> >> Andrus
>> >>
>> >> On Jul 16, 2012, at 1:00 PM, Eshan Sudharaka wrote:
>> >>
>> >>> Hi,
>> >>> I was trying to reproduce the issue CAY-1714 and it seems that
>> following
>> >>> operation is now invalid. (since CayenneContext has mo such method
>> >>> declaration)
>> >>>
>> >>> ObjectContext clientContext = this.clientContext.createChildContext();
>> >>>
>> >>> So is this bug is fixed  now ?
>> >>>
>> >>> --
>> >>> *~Thanks & Regards~*
>> >>> ***
>> >>> *
>> >>> Eshan
>> >
>> >
>> >
>>
>>
>
>
> --
> *~Thanks & Regards~*
> ***
> *
> P.A.Eshan Sudharaka
> Dept of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
> http://esudharaka.blogspot.com/
>
>


-- 
*~Thanks & Regards~*
***
*
P.A.Eshan Sudharaka
Dept of Computer Science and Engineering
University of Moratuwa
Sri Lanka
http://esudharaka.blogspot.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message