This is a migrated thread and some comments may be shown as answers.

AttachCopy throwing NotImplementedException

1 Answer 37 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paulo
Top achievements
Rank 1
Paulo asked on 04 Nov 2013, 04:59 PM
Hello!

I'm trying to update an entity on database using the AttachCopy method, but i'm getting the following error:


   at OpenAccessRuntime.common.GenericState.UnresolveForCompare(Object x, FieldMetaData fmd, OpenAccessPersistenceManagerImp pm)
   at OpenAccessRuntime.common.GenericState.Equals(State o, Int32 stateFieldNo, OpenAccessPersistenceManagerImp myPm, OpenAccessPersistenceManagerImp otherPm)
   at Telerik.OpenAccess.Runtime.Detached.AttachOperation.FindChanges(Boolean[] filled, State detached, OpenAccessPersistenceManagerImp detachedPM, State online, Int32 ignoreCC)
   at Telerik.OpenAccess.Runtime.Detached.AttachOperation.AttachCopyImplDetached(OpenAccessPersistenceManagerImp srcPM, PersistenceCapable src)
   at Telerik.OpenAccess.Runtime.Detached.AttachOperation.AttachCopyImpl(PersistenceCapable src, Boolean copy)
   at Telerik.OpenAccess.Runtime.Detached.AttachOperation.AttachCopies()
   at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.AttachCopies(ArrayList persistentObjects)
   at OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.AttachCopies(ArrayList persistentObjects)
   at OpenAccessRuntime.ObjectScope.AttachCopies(ArrayList persistentObjects)
   at Telerik.OpenAccess.OpenAccessContextBase.AttachCopy[T](T entity)
   at ObjetosComuns.InfraestruturaGenerica.Abstratas.Repositorio`2.Salvar(TDominio entidade) na c:\Builds\4\ObjetosComunsDominio\InfraestruturaGenerica\src\JMSOFT_2012\ObjetosComunsDominio\ObjetosComuns\InfraestruturaGenerica\Abstratas\Repositorio.cs:linha 30

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 06 Nov 2013, 12:43 PM
Hello Paulo,

I tried to reproduce this here. It seems, that the exception is caused by an unexpected state of a collection or map field. In order to fix this, we would like to know the structure of your entity and what kind of operations you did on the entity in the context; also, are there fetchplans involved?

Regards,
Thomas
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
Tags
Development (API, general questions)
Asked by
Paulo
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or