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

Reverse Mapping and Naming Rules

3 Answers 22 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.
Karlkim Suwanmongkol
Top achievements
Rank 1
Karlkim Suwanmongkol asked on 20 Sep 2010, 09:50 PM
Tables and columns in our Oracle Database are all caps (e.g., PERSON_PROFILE). When I tried to reverse mapping those tables, the naming rules seems to have the problem.

For example,

I want the PERSON_PROFILE table to be mapped to PersonProfile class. I can check the "remove underscores", but the PascalCase will have the class name "PERSONPROFILE". Is there a way to modify the rule ot make everything small caps and then do the PascalCase?

Thanks,
Karlkim

3 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 23 Sep 2010, 04:54 PM
Hello Karlkim Suwanmongkol,

 There is no real way to distinguish entire words in just one string. Because of that we are always interpreting the capital letter as a start of a new word. This would mean that when you have a word that has only capital letters each letter will be regarded as a new word. What is the behavior that you expect? Maybe there is a better approach that you have in mind. We will be happy to consider any suggestions.

Best wishes,
Petar
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
0
Karlkim Suwanmongkol
Top achievements
Rank 1
answered on 27 Sep 2010, 03:56 PM
Hi Petar,
   I might not be clear or miss something. Here is what I mean:

Table name in Oracle (all caps): PERSON_PROFILE
OpenAccess setting: remove underscores & PascalCase
Output: PERSONPROFILE

Expected output: PersonProfile

Basically, I just want OpenAccess to lower all caps and apply the naming rules. This also applies to column name which are mapped to field and property.

Thanks,
karlkim

0
PetarP
Telerik team
answered on 30 Sep 2010, 03:59 PM
Hello Karlkim Suwanmongkol,

 What I was saying is that there is no way to know which capital letter marks the start of a new word and which not. Imagine the following situation:
Table name: OrderDetails_Extended
OpenAccess setting: remove underscores & PascalCase
Output now: OrderDetailsExtended
Output if we don't treat capital letters as start of a new word: OrderdetailsExtended
Cases like the above is the main reason why we are treating capital letters as start of a new word.

All the best,
Petar
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
Design Time (Visual Designer & Tools)
Asked by
Karlkim Suwanmongkol
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Karlkim Suwanmongkol
Top achievements
Rank 1
Share this question
or