cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Can default values be set in Constructor instead of setPersistenceState()?
Date Fri, 03 Aug 2012 11:32:48 GMT
ObjectContext is an interface... When you are dealing with an object in debugger, the instance
will be of a specific implementation type (there can't be an instance of an interface obviously).
Which is normally DataContext. So yes, not a problem.

On Aug 3, 2012, at 2:04 PM, Kanwar Manish wrote:

> Hey Thanks again
> 
> This worked out like a charm.
> 
> But I am using ObjectContext for creating my objects. I hope that is not
> the problem?
> 
> Thanks
> Kanwar Manish
> 
> On Fri, Aug 3, 2012 at 3:54 PM, Andrus Adamchik <andrus@objectstyle.org>wrote:
> 
>> I am an Eclipse user.. I have no NetBeans experience at all unfortunately.
>> 
>> But you can get the source jars matching Cayenne binary jars straight from
>> Maven repo. Here is the one you likely need:
>> 
>> 
>> http://search.maven.org/remotecontent?filepath=org/apache/cayenne/cayenne-server/3.1B1/cayenne-server-3.1B1-sources.jar
>> 
>> Andrus
>> 
>> On Aug 3, 2012, at 1:16 PM, Kanwar Manish wrote:
>> 
>>> Thanks Andrus.
>>> 
>>> I am afraid that will be a bit tough for me - for now. I am a complete
>> Java
>>> and Linux noob, coming from .NET background.
>>> 
>>> I tried attaching 3.1B1 source to the binaries [in Netbeans 7.2] but
>>> failed. I just can't figure out which source folder to attach with which
>>> Cayenne Jar [Client, server, tools or lifecycle].
>>> 
>>> Can anybody help me out here please?
>>> 
>>> Thanks
>>> Manish
>>> 
>>> 
>>> 
>>> On Fri, Aug 3, 2012 at 1:28 PM, Andrus Adamchik <andrus@objectstyle.org
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I am not aware of any issues with PostAdd. Your best bet is to debug
>>>> inside Cayenne DataContext.newObject(..). Specifically in BaseContext
>> there
>>>> is a method "injectInitialValue" that has this line at the end:
>>>> 
>>>> // invoke callbacks
>>>> getEntityResolver().getCallbackRegistry().performCallbacks(
>>>>               LifecycleEvent.POST_ADD,
>>>>               object);
>>>> 
>>>> This is where callbacks are invoked. Please share what you find here,
>> and
>>>> maybe based on those clues we can unwind it further.
>>>> 
>>>> Cheers,
>>>> Andrus
>>>> 
>>>> 
>>>> On Aug 3, 2012, at 9:08 AM, KM wrote:
>>>> 
>>>>> Removed the check for the key.
>>>>> 
>>>>> It seems that the problem is that this is not getting fired at all.
>>>>> Breakpoint is not being hit. This is strange.
>>>>> 
>>>>> I have checked for the abstract declaration in the parent class.
>> Setting
>>>>> this up in the modeler.
>>>>> 
>>>>> Has anyone faced this problem before?
>>>>> 
>>>>> Thanks
>>>>> Kanwar Manish
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> View this message in context:
>>>> 
>> http://cayenne.195.n3.nabble.com/Can-default-values-be-set-in-Constructor-instead-of-setPersistenceState-tp3320047p4024479.html
>>>>> Sent from the Cayenne - User mailing list archive at Nabble.com.
>>>>> 
>>>> 
>>>> 
>> 
>> 


Mime
View raw message