Generally this error could occur when you try to detach an object which is not persistent. If the enhancement process is successful the enhancer settings should not be a cause for the exception in question to be thrown.
Please verify whether the collection you are trying to detach contains any non persistent objects.
Another possible reason could be that you are calling CreateDetachedCopy<T>(T entity, FetchStrategy fetchStrategy)
instead of CreateDetachedCopy<T>(IEnumerable<T> entities, FetchStrategy fetchStrategy)
. This could happen if you call CreateDetachedCopy without explicitly specifying T.
You could try calling CreateDetachedCopy with explicitly specified type (the type of the elements in the passed collection) and pass a fetch strategy
or null for the second argument. This will force the right overload of the method to be called. For more information about the different overloads of the CreateDetachedCopy method refer to this documentation article
I hope this helps. If you have any more questions, feel free to post in our forums again.
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!