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

Reverse & Forward Mapping 'image' field

1 Answer 72 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 2
James asked on 15 Sep 2010, 11:50 AM
Hello,

VS2010 + OpenAccess Q2.2010 + MSSQL 2008 R2 Express

Reverse mapping NorthwindOA database tables, and re-build the solution/project.

Output:

"c:\program files (x86)\telerik\openaccess orm\sdk\VEnhance.exe" -assembly:"C:\Telerik_Learn\OpenAccess_ORM\GettingStarted\obj\x86\Debug\GettingStarted.exe" -config:"C:\Telerik_Learn\OpenAccess_ORM\GettingStarted\App.config" -verboseMode:1 -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.dll" -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Core.dll" -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.Linq.dll" -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.DataSetExtensions.dll" -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\Microsoft.CSharp.dll" -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.dll" -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll" -reference:"C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.dll" -reference:"C:\Program Files (x86)\Telerik\OpenAccess ORM\bin\Telerik.OpenAccess.35.Extensions.dll" -reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\mscorlib.dll"<br>C:\Telerik_Learn\OpenAccess_ORM\GettingStarted\Category.cs(10, 1): warning:OpenAccess Warning: Explicit change tracking required for the array field GettingStarted.Category.picture. [class=GettingStarted.Category] [field=picture]<br><br>OpenAccess Warning: Explicit change tracking required for the array field GettingStarted.Category.picture. [class=GettingStarted.Category] [field=picture]<br>C:\Telerik_Learn\OpenAccess_ORM\GettingStarted\Employee.Telerik.OpenAccess.cs(10, 1): warning:OpenAccess Warning: Explicit change tracking required for the array field GettingStarted.Employee.photo. [class=GettingStarted.Employee] [field=photo]<br><br>OpenAccess Warning: Explicit change tracking required for the array field GettingStarted.Employee.photo. [class=GettingStarted.Employee] [field=photo]<br>C:\Telerik_Learn\OpenAccess_ORM\GettingStarted\LargeEmployee.cs(10, 1): warning:OpenAccess Warning: Explicit change tracking required for the array field GettingStarted.LargeEmployee.photo. [class=GettingStarted.LargeEmployee] [field=photo]

It seems three 'image' fields (Category, Employee, LargeEmployee tables) fail to be forward mapped when re-building the solution/project.

Thus, if I create a new 'MyCustomer.cs' with [Telerik.OpenAccess.Persistent()] enabled, forward mapping will not be successful after re-build the solution/project, nor Telerik > OpenAccess > Database Operations > Update Database can be successful.

Should I ignore these warnings? If I manually add new fields in the model classes, then forward mapping will fail, and Update Database operation will thrown an error.

Please advise me. Thanks!

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 16 Sep 2010, 02:49 PM
Hi James,

These warnings mean that the content of the arrays is not tracked for changes by OpenAccess. You can find more details on that matter in this article.
As to the database not being updated, please verify that the UpdateDatabase property of your project is enabled. Also remove the db-do-not-create-table node from the App.config for each class that you want to be forward mapped. Then you should be able to rebuild the project and update the schema.

Greetings,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Databases and Data Types
Asked by
James
Top achievements
Rank 2
Answers by
Alexander
Telerik team
Share this question
or