From: Alexey G. (JIRA) <nh...@gm...> - 2011-05-06 20:03:07
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Gorbach updated NH-2510: ------------------------------- Attachment: NH2510-Fixture.patch Hi! This patch adds failing unit test to current trunk. It throws following exception: System.InvalidCastException : Unable to cast object of type 'System.Object' to type 'System.Byte[]'. at NHibernate.Type.BinaryType.ToInternalFormat(Object bytes) in BinaryType.cs: line 39 at NHibernate.Type.AbstractBinaryType.DeepCopyNotNull(Object value) in AbstractBinaryType.cs: line 148 at NHibernate.Type.MutableType.DeepCopy(Object value, EntityMode entityMode, ISessionFactoryImplementor factory) in MutableType.cs: line 48 at NHibernate.Type.AbstractType.Assemble(Object cached, ISessionImplementor session, Object owner) in AbstractType.cs: line 92 at NHibernate.Type.TypeHelper.Assemble(Object[] row, ICacheAssembler[] types, ISessionImplementor session, Object owner) in TypeHelper.cs: line 67 at NHibernate.Cache.Entry.CacheEntry.Assemble(Object[] values, Object result, Object id, IEntityPersister persister, IInterceptor interceptor, ISessionImplementor session) in CacheEntry.cs: line 79 at NHibernate.Cache.Entry.CacheEntry.Assemble(Object instance, Object id, IEntityPersister persister, IInterceptor interceptor, ISessionImplementor session) in CacheEntry.cs: line 72 at NHibernate.Event.Default.DefaultLoadEventListener.AssembleCacheEntry(CacheEntry entry, Object id, IEntityPersister persister, LoadEvent event) in DefaultLoadEventListener.cs: line 475 at NHibernate.Event.Default.DefaultLoadEventListener.LoadFromSecondLevelCache(LoadEvent event, IEntityPersister persister, LoadType options) in DefaultLoadEventListener.cs: line 448 at NHibernate.Event.Default.DefaultLoadEventListener.DoLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) in DefaultLoadEventListener.cs: line 314 at NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) in DefaultLoadEventListener.cs: line 110 at NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) in DefaultLoadEventListener.cs: line 166 at NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) in DefaultLoadEventListener.cs: line 82 at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) in SessionImpl.cs: line 2494 at NHibernate.Impl.SessionImpl.Get(String entityName, Object id) in SessionImpl.cs: line 1336 at NHibernate.Impl.SessionImpl.Get(Type entityClass, Object id) in SessionImpl.cs: line 1273 at NHibernate.Impl.SessionImpl.Get(Object id) in SessionImpl.cs: line 1257 at NHibernate.Test.LazyProperty.NH2510Fixture.PropertyLoadedNotInitialized() in NH2510.cs: line 49 > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |