AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

mapping difficulty with table names that appear to be plurals #511

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Table Exists in database with name ending is 's'
2. That name is used in mapping table, e.g., tblReports --> Report
3. Generate the outputs 

What is the expected output? What do you see instead?
we expect the entity to be named Report.  But tblReports is used.

BUT!!!  If we change the map entry to tblReport, this actually DOES work even 
though the table name itself still has the 's' on the end.  So it seems that 
the mapping function is using the tablename.ToSingular result rather than 
TableFullName.

What version of the product are you using?
5.2.2

Please provide any additional information below.

Original issue reported on code.google.com by RQJohnso...@gmail.com on 4 Oct 2010 at 7:50

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 5 Oct 2010 at 10:33

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r2520.

Fixed a bug where the KeywordRenameAlias was not looking up the tables 
fullname, it was using a ToSingular or ToPluaral Version.. It should now use 
the ordering:

1. Use CS_Alais ExtendedProperty value.
2. Use KeywordRenameAlias.csmap value.
3. Call ToPlural or ToSingular and strip table prefixes.

Original comment by bniemyjski on 9 Mar 2012 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 9 Mar 2012 at 2:15