I have a project with Data Access Q3 2014 SP1 (2014.3.1209.1). The project handle db tables in 2 different databases. In both databases we use an identical table. So the class have the same name and the same table name but are in different name spaces. When I compile the project on my developer PC everything works fine. If I build the solution with TFS build agent (MSBuild), the the following error occurred at program start:
An error occurred while writing to database table 'xxxxxxx'.
The supplied instance is not of type Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable (<ClassName>). Are you trying to add a wrong object or is the assembly not enhanced?
I spend a lot of time to analyze the problem and found the problem with JustDecompile (another cool tool from Telerik).
Only one class is enhanced by the enhancer.
public class MyClass: ISerializable, PersistenceCapable
The other class is NOT enhanced by the enhancer.
public class MyClass: ISerializable
I solved the problem by rename the classes and the table names.
Is this issue solved in newer version of DataAccess?
Exists an other workaround?