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

Reverse Mapping - stop removing plural "s"

7 Answers 96 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.
Timothy Fischer
Top achievements
Rank 1
Timothy Fischer asked on 27 Jul 2009, 05:44 PM
Hi,
Is there a config option to have the reverse mapping stop removing the "s" off our tables?  having class names of "Basi" instead of Basis, and a hundred other classes is virtually unusable.  And whenever we regen the stuff - it never remembers our fixes from workstation to workstation, etc.

Please help!
Thanks,

Tim

7 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 28 Jul 2009, 08:59 AM
Hi Tim,

 Currently there is no option to switch this behavior off, but we have implemented an improved name generation mechanism that would handle 'singular to plural' naming more intelligently.
This implementation should be available in the near future in one of our service packs.

 Whenever you make changes to the default name , ex: Basi to Basis, this change is saved in the Reversemapping.config file. If this file is not present in the project, the schema is read from the database and default settings are applied.

Kind regards,
Ady
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Robert
Top achievements
Rank 1
answered on 01 Sep 2009, 10:23 AM
Hello All,

We have several hundred data classes which we maintain by reverse engineering the database. Changing naming conventions breaks our ability to maintain the syncronisation between the database and data classes in an automated way.

Given the complexity of the English language I have my doubts as about how accurate this process can be.

Non-english table names will also cause problems for the users.

There also seems to be problems with capital letters in table names for example ABC_table creates the A_B_C_table class where as abc_table maps to abctable.

For the above reasons I also  would like to see the option to suppress renaming.

Thanks,

Robert.
0
PetarP
Telerik team
answered on 03 Sep 2009, 12:16 PM

Hi Robert,

Currently there is no other way to avoid this except to manually rename your classes. We have implemented an improved naming mechanism that proves to be really accurate. However with the new mechanism you will have the option to specify some rules using just play XML. You will be able to specify rules for other languages as well. This mechanism should be in place with one of our future service packs.

Sincerely yours,

Petar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Oleg
Top achievements
Rank 1
answered on 10 Sep 2009, 12:39 PM
Hi,
When will we get service pack with "improved naming mechanism"?

Thanks,
Oleg
0
PetarP
Telerik team
answered on 11 Sep 2009, 09:03 AM
Hi Oleg Voinov,

The naming mechanism is to be integrated into the product. I cannot give you an exact time frame in which the service pack will be released but I will notify you once this happens. We are sorry for any inconvenience caused.

Kind regards,
Petar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert Gibbins
Top achievements
Rank 1
answered on 11 Sep 2009, 09:26 AM
Hello Petar,

Would it be possible for this naming mechanism to write some form of xml naming file such that:

1. If no entry exists in the file for a class or field, one is written using the current naming convention.

2. If a name for a class or field exists in the xml file, that name is used instead.

This would have several advantages. Firstly changes to the naming algorithm would no longer change the object model when reverse engineering and secondly any problems with naming could be 'fixed' by updating the mapping file.

Kind Regards,

Robert.
0
PetarP
Telerik team
answered on 11 Sep 2009, 01:41 PM
Hello Robert Gibbins,

1. Initially all XML entries will have to be written on hand by the user. You can, of course, implement some logic to be executed after reverse map that will traverse all your generated classes and add the "fixes" you have made to the XML file.
2. That would be the purpose of the XML file. The mechanism would have some basic rules implemented in itself but whenever there is an entry in the XML file that "conflicts" with the mechanism than the entry is respected. For example:
You have a table Orders. The default naming mechanism would try to rename it to Order. Now if you have an xml entry that says that each time the word Orders is met it should be reverse mapped to Ord (this is just an example) then the wizard would reverse map it to Ord (as specified in the XML file).

All the best,
Petar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Design Time (Visual Designer & Tools)
Asked by
Timothy Fischer
Top achievements
Rank 1
Answers by
Ady
Telerik team
Robert
Top achievements
Rank 1
PetarP
Telerik team
Oleg
Top achievements
Rank 1
Robert Gibbins
Top achievements
Rank 1
Share this question
or