locked
What is the reason lightswich adds and removed the S character pulled from a database. Is there a way to turn it off? RRS feed

  • Question

  • I used an existing database when creating lightswitch HTML client project.


     I noticed that in my Data Sources that the letter s is added at the end of all my tables that doesn't have s ending in it. For example Status table doesn't change but Product table is renamed to Products. 

    1. Why does Lightswitch do it. I know I can rename it back but is there a way to turn this functionality off when I started.
    2. Taking the above into consideration when I create relationships in Lightswitch between the table from the lookup table to the transaction table then it gets even weirder my Status table suddenly shows as Statu without an s. I have a table Species that is changed to Specy. These name I can't seem to rename and is also shown in the screen. It seems lightswitch want to remove the s from the tables. Should I then never use a table with the name ending in S like Status or Species?
    3. Is there other renaming behavior I need to know about as I just started out?

    Tuesday, May 7, 2013 9:35 AM

Answers


  • If it was that simple of just a pluralization issue but it is like the function is written by an school kid with removing the S to show Statu because it though Status is plural. If the functionality can't realize that Statuses is the plural of Status then it should be removed as it is not intelligent at all.

    Pluralization is one thing but some words like my table Species is both singular and plural and then for it to show as Specy is stupid. What type of pluralization is it trying to create here. Also if the database table names are in a foreign language it could possible mean creating possible offensive words removing the s and adding the ies.

    I looked at the link you posted and it says

    "Pluralization can be overridden on a case by case basis by renaming the individual entity names and plural names in the property sheet (which will break their linkage and effectively turn off plurization). It is also turned off automatically for non-english versions of LightSwitch."

    So I just need to install Lightswitch somehow as non English and my problem will be resolved.


    • Edited by madlo Tuesday, May 7, 2013 10:39 AM
    • Marked as answer by madlo Tuesday, May 7, 2013 10:40 AM
    Tuesday, May 7, 2013 10:24 AM

All replies

  • There is another discussion here on this thread about the same thing:

    http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/d3e14f92-1e03-489a-8966-9d820a1e6e65

    It probably works best when you're starting out from scratch as Lightswitch will have full control over your schema but if you're using an existing data source I can see why it may be a little strange. Also on that thread there is a link to Microsoft Connect where some users are voting to have a "on/off switch" for the pluralization. 

    Tuesday, May 7, 2013 10:07 AM

  • If it was that simple of just a pluralization issue but it is like the function is written by an school kid with removing the S to show Statu because it though Status is plural. If the functionality can't realize that Statuses is the plural of Status then it should be removed as it is not intelligent at all.

    Pluralization is one thing but some words like my table Species is both singular and plural and then for it to show as Specy is stupid. What type of pluralization is it trying to create here. Also if the database table names are in a foreign language it could possible mean creating possible offensive words removing the s and adding the ies.

    I looked at the link you posted and it says

    "Pluralization can be overridden on a case by case basis by renaming the individual entity names and plural names in the property sheet (which will break their linkage and effectively turn off plurization). It is also turned off automatically for non-english versions of LightSwitch."

    So I just need to install Lightswitch somehow as non English and my problem will be resolved.


    • Edited by madlo Tuesday, May 7, 2013 10:39 AM
    • Marked as answer by madlo Tuesday, May 7, 2013 10:40 AM
    Tuesday, May 7, 2013 10:24 AM