Reverse Mapping and Naming Rules

4 posts, 0 answers
  1. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 20 Sep 2010 Link to this post

    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
  2. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 23 Sep 2010 Link to this post

    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
  3. DevCraft banner
  4. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 27 Sep 2010 Link to this post

    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

  5. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 30 Sep 2010 Link to this post

    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
Back to Top