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

BUG:Unmap and Map will change names

4 Answers 55 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 30 Sep 2011, 01:21 PM
Hi,
I'm using pascal case field names in DB.
Reading DB fields keep the pascal case, however, if I unmap and create map the table from scratch, the property names will change with lower case and underscores.
Once table is unmap, I can't remap using pascal case anymore.
This is causing quite a bit of problem.

In the model setting, there are naming rules whether to remove underscores and to interpret underscores as word delimiter.
I have them uncheck, thus, it shouldn't change field name.

Can you please take a look at this?

Thanks.


ps. I'm having lots of problems with inheritance, I think you sould try to test using mid-to-large size project to see all the problems users are facing. I still haven't given up because I already invested quite a bit of time but my patiences are running low.

4 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 30 Sep 2011, 03:33 PM
Hi Chris,

This is definitely not the expected behavior. However, I was not able to reproduce it on my side.
Could you please give me some more information about your setup - is there any inheritance involved in the class you are mapping/unmapping? It would be best if you could send me your rlinq file in a support ticket (you will not be able to attach it to the forum post) and describe what steps need to be performed to see the problem - how exactly you are unmapping/mapping the table, etc. 

Regards,
Alexander
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

0
Chris
Top achievements
Rank 1
answered on 30 Sep 2011, 04:26 PM
Hi,
Let me put it this way.
Create Empty Model with Pascal Case property and map to a table.
Table field is always convert Pascal Case to lower case and underscores.
Like wise, when you read in Pascal Case from DB and remap to table (by deleting old table and map), it will always convert to lower case and underscores.
You will then cannot map to Pascal Case in the DB anymore.

Thanks.
0
N Mackay
Top achievements
Rank 1
answered on 04 Oct 2011, 11:32 AM
Chris,

I also had that issue but ignored it as stored procedure mapping issues were a bigger stumbling block for us.
0
Alexander
Telerik team
answered on 05 Oct 2011, 02:50 PM
Hi Chris,

Thank you for the clarification, I think I understand the case now. Please note that the naming rules you can set in the model settings apply only to classes being generated from tables (reverse mapping from a database). If you delete the table from the model and try to create it again, based on your persistent class (forward mapping from a class), another naming mechanism will be used to generate the table/column names, which actually creates the lower letters and underscores you see. Unfortunately at the moment there is no way to configure this naming mechanism, but this is on our TODO list. 
If you want to continue using forward mapping, you can always edit the column names manually in our Table Editor, before creating/updating the database from your model.
I hope that helps.

Best wishes,
Alexander
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

Tags
Design Time (Visual Designer & Tools)
Asked by
Chris
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Chris
Top achievements
Rank 1
N Mackay
Top achievements
Rank 1
Share this question
or