Yeah, don't worry about the call from deepCopy(). I removed that
in the latest CVS, since it was unnecessary. It should not have been
actually *harmful*, however.....




                                                                                       
                                               
                    "Viktor Szathmary"                                                 
                                               
                    <[EMAIL PROTECTED]>                 To:     [EMAIL PROTECTED]      
                                   
                    Sent by:                                cc:     [EMAIL PROTECTED]  
                           
                    [EMAIL PROTECTED]       Subject:     Re: [Hibernate] hib2 - parent 
in composite-element           
                    eforge.net                                                         
                                               
                                                                                       
                                               
                                                                                       
                                               
                    03/02/03 10:33 AM                                                  
                                               
                                                                                       
                                               
                                                                                       
                                               




hi,

On Mon, 3 Feb 2003 09:32:39 +1100, [EMAIL PROTECTED] said:
>
> Are there proxies involved?
>

hopefully not :) it seems that there's actually two calls to
nestedChild.setParent() on the same nestedChild instance - the second one
occurs during deepCopy, and blows away the value that was set first...
here are the stacktraces (the assertion in the testcase expected the
parent to be [EMAIL PROTECTED]):

[EMAIL PROTECTED](
[EMAIL PROTECTED] ):

           at net.sf.flock.hibernate.Item.setOrigin(Item.java:28)
           at net.sf.flock.hibernate.Feed.setItems(Feed.java:31)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

           at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

           at java.lang.reflect.Method.invoke(Method.java:324)
           at
net.sf.hibernate.util.ReflectHelper$Setter.set(ReflectHelper.java:39)
           at
net.sf.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:132)
           at
net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:64)
           at net.sf.hibernate.loader.Loader.hydrate(Loader.java:348)
           at
net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:298)
           at net.sf.hibernate.loader.Loader.doFind(Loader.java:142)
           at net.sf.hibernate.loader.Loader.find(Loader.java:487)
           at
net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:951)
           at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1186)
           at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1165)
           at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1161)
           at
net.sf.flock.hibernate.HibernateSubscriptionManager.loadSubscription(HibernateSubscriptionManager.java:72)

           at
net.sf.flock.hibernate.HibernateSubscriptionManagerTest.testPersistence(HibernateSubscriptionManagerTest.java:50)


.... and then...
[EMAIL PROTECTED](
[EMAIL PROTECTED] ):

           at net.sf.flock.hibernate.Item.setOrigin(Item.java:28)
           at net.sf.flock.hibernate.Feed.setItems(Feed.java:31)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

           at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

           at java.lang.reflect.Method.invoke(Method.java:324)
           at
net.sf.hibernate.util.ReflectHelper$Setter.set(ReflectHelper.java:39)
           at
net.sf.hibernate.type.ComponentType.setPropertyValues(ComponentType.java:181)

           at
net.sf.hibernate.type.ComponentType.deepCopy(ComponentType.java:204)
           at
net.sf.hibernate.type.TypeFactory.deepCopy(TypeFactory.java:188)
           at
net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1743)
           at net.sf.hibernate.loader.Loader.doFind(Loader.java:180)
           at net.sf.hibernate.loader.Loader.find(Loader.java:487)
           at
net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:951)
           at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1186)
           at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1165)
           at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1161)
           at
net.sf.flock.hibernate.HibernateSubscriptionManager.loadSubscription(HibernateSubscriptionManager.java:72)

           at
net.sf.flock.hibernate.HibernateSubscriptionManagerTest.testPersistence(HibernateSubscriptionManagerTest.java:50)


--
http://fastmail.fm - And now for something completely different...


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




**********************************************************************
Any personal or sensitive information contained in this email and
attachments must be handled in accordance with the Victorian Information
Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988
(Commonwealth), as applicable.

This email, including all attachments, is confidential.  If you are not the
intended recipient, you must not disclose, distribute, copy or use the
information contained in this email or attachments.  Any confidentiality or
privilege is not waived or lost because this email has been sent to you in
error.  If you have received it in error, please let us know by reply
email, delete it from your system and destroy any copies.
**********************************************************************





-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Reply via email to