This question is locked. New answers and comments are not allowed.
Hi,
I defined my DB schema in OpenAccess.
I chose a field named "ID" and later realized that it is mapped as [i_d] in the database table.
So I changed the field name to "Id". To my surprise, OpenAccess told me "no change to DB schema" when I tried to "migrate database".
Only after I've change to "Create Database" did I see that the mapped field name was changed to [id] in the script window.
I think this is a bug of OpenAccess.
Please verify.
Thanks
I defined my DB schema in OpenAccess.
I chose a field named "ID" and later realized that it is mapped as [i_d] in the database table.
So I changed the field name to "Id". To my surprise, OpenAccess told me "no change to DB schema" when I tried to "migrate database".
Only after I've change to "Create Database" did I see that the mapped field name was changed to [id] in the script window.
I think this is a bug of OpenAccess.
Please verify.
Thanks
4 Answers, 1 is accepted
0
0
Hello Ohsha,
Actually this is an expected behavior. In this case a default mapping is being used for the classes which are not explicitly mapped to tables. This mechanism will calculate the table mapping for the classes and will use a default naming strategy for the class and the property name generation.What you could do is to map these classes to tables using the Table Editor.
Hope that helps. If any other questions arise do not hesitate to contact us back.
All the best,
Damyan Bogoev
the Telerik team
Want to use Telerik OpenAccess with SQL Azure? Download the trial version today.
0
Ohsha
Top achievements
Rank 1
answered on 10 Apr 2012, 08:49 PM
Thanks Damyan, but I don't quite understand your answer.
My questions were:
1. why mapped field name changed but migrate database wasn't able to detect that?
2. why characters are missing from mapped field name?
Which one is expected behavior?
My questions were:
1. why mapped field name changed but migrate database wasn't able to detect that?
2. why characters are missing from mapped field name?
Which one is expected behavior?
0
Hi Ohsha,
When Default Mapping is being used for a given persistent capable class this means that Telerik OpenAccess ORM will take care of the property to column mapping and will calculate automatically the metadata for the corresponding relational part, using default settings for:
- Table / column naming strategy. The naming strategy, for example, will change all letters to lower, will remove the vowel letters, etc. ;
- Type mapping between CLR to SQL types;
- Concurrency control mechanism, etc.;
I am sorry for the inconvenience caused.
All the best,
Damyan Bogoev
the Telerik team
Want to use Telerik OpenAccess with SQL Azure? Download the trial version today.