Entityname is trimming

Posts   
 
    
Khurram
User
Posts: 198
Joined: 26-Nov-2011
# Posted on: 19-Apr-2012 14:53:55   

Hi in my database i have a table with the name of ClientStatus. Now when ever I re-generate the code by right clicking the option reverse-engineer Tables to entity definations the grid always shows the **ClientStau **entity rather ClientStatus.

Lots of time it has caused issues after regenerting the code. So now when ever I generate the code I take care and give proper name to **ClientStatus **rather ClientStatu.

I am suspecting maybe the grid you guys are using is messing up some where. If you know the problem it is very small issue, for now I know this problem so I know it is very small issue but it took me days to find out what is happneing actually.

Kindly look into this issue please

Thanks Khurram

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 19-Apr-2012 22:40:00   

Khurram wrote:

Hi in my database i have a table with the name if ClientStatus. Now when ever I re-generate the code by right clicking the option reverse-engineer Tables to entity definations the grid always shows the **ClientStau **entity rather ClientStatus.

Hi Khurram. Just to make sure, this happens in new projects, right? Because why would you reverse-engineer to entities if they are already mapped?

Another important thing: What LLBLGen version and build nr are you using? (http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7725)

If we can reproduce it, we will fix it wink

David Elizondo | LLBLGen Support Team
Khurram
User
Posts: 198
Joined: 26-Nov-2011
# Posted on: 20-Apr-2012 09:39:00   

I am regenerating the code again when ever I changing my schema. i am using the latest build as of 12 April (I think)

Thanks Khurram

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Apr-2012 10:06:23   

So when you refresh the schema, the name of the entity (which was mapped before) changes back to the trimmed version?

Does this happen with other entities?

Khurram
User
Posts: 198
Joined: 26-Nov-2011
# Posted on: 20-Apr-2012 10:50:06   

No, this is only happneing to only and only ClientStatus table. SO for the time being when ever I am re generating the code I am always checking this specific entity and always putting "s" manually

Thanks Khurram

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Apr-2012 11:08:06   

This might be the effect of name singularization. Please check this disable name singularization

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 20-Apr-2012 11:09:58   

What version? v2.6 or other?

Frans Bouma | Lead developer LLBLGen Pro
Khurram
User
Posts: 198
Joined: 26-Nov-2011
# Posted on: 20-Apr-2012 11:55:22   

I am attaching the images please see the images for further references. I am using 3.5 - 30 -March- 2012 release

Thanks Khurram

Attachments
Filename File size Added on Approval
LLBLGEN.Grid.Problem.png 157,673 20-Apr-2012 11:58.18 Approved
Posts: 24
Joined: 26-May-2011
# Posted on: 20-Apr-2012 13:19:44   

hello I have faced the same issue. I am using 3.1 version.

With my case: table name JobStatus and llblgen generates JobStatu entity. I manually edit Entity name (JobStatu=> JobStatus) in llblgen project Explorer and it is child node i.e. Relationships child node.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 20-Apr-2012 23:35:58   

I think is the PlurarSingularConverter Plugin trying to singularize the word. The thing is: when you enable that plugin (default) it expects the tables names in plural. For instances Customers become Customer, etc.

The word Status is in singular form, the plural of Status is Statuses (ref...). So as the plugin receives "Status" as the table name it doesn't find any special rule for the word, so it applies the general rule for singularization, that is remove the trailing 's'.

If your tables names are all in singular, disable the plugin, follow the link posted by Walaa. If this is an exception, you either live with renaming it each time, or you can download the SourceCode package form LLGLBen site -> Customer Area. In the source code open the Plugins project and see the Inflector.cs class. You can add an "irregular" rule for that word.

AddIrregular("status", "status");

Then compile the code and remplace the compiled dll into <LLBLGen intallation folder>\Plugins.

David Elizondo | LLBLGen Support Team