Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Preserving underscores in element names not working
 

Pages: 1
Bugs & Issues
Preserving underscores in element names not working
Page:1/1 

  Print all messages in this thread  
Poster Message
Emmanuel
User



Location:
Ottawa, Canada
Joined on:
13-Jan-2006 23:14:31
Posted:
167 posts
# Posted on: 16-Jun-2015 15:14:57.  
The "Remove underscores from element name" project setting is not working when it is set to false. I've tried deleting all previously-generated files and regenerating from scratch but field names in my entities still have underscores removed. I've confirmed that the underscores are in the field names in the Catalog Explorer listing of entities.

I'm generating EF6, .NET4.5, General template group, SD.EntityFramework.v6 (Code First) preset.

My designer is version 4.2 Final (Feb 16 2015).

BTW, I tried to confirm that this was the latest version but cannot figure out how to access the Customer Area since the new LLBLGen.com website.

  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14588 posts
# Posted on: 16-Jun-2015 22:25:23.  
Aren't the underscores get removed when you map new entities form the catalog explorer?

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37880 posts
# Posted on: 16-Jun-2015 22:35:19.  
Emmanuel wrote:
BTW, I tried to confirm that this was the latest version but cannot figure out how to access the Customer Area since the new LLBLGen.com website.

after you log in, you get a new menu entry 'My account' which contains the downloads and other info Regular Smiley
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Emmanuel
User



Location:
Ottawa, Canada
Joined on:
13-Jan-2006 23:14:31
Posted:
167 posts
# Posted on: 17-Jun-2015 01:59:41.  
Walaa wrote:
Aren't the underscores get removed when you map new entities form the catalog explorer?


(I got to the customer area and got the latest build of the designer - same result)

Yes, the underscores are being removed when I map the new entities from the catalog explorer. But why? I have the setting set to false (the default is true) and so I expect underscores to NOT be removed.

However, I realize now that my fields with underscores are being renamed because they are FKs and subject to the FK field naming pattern. So, I think it is behaving as expected.

It sure would be nice if the FK field naming pattern included an option to just leave the field name alone and not rename it. We have a convention for naming FK fields which cannot be duplicated with the LLBLGen naming pattern tokens.




  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37880 posts
# Posted on: 17-Jun-2015 10:42:36. Goto attachments  
Emmanuel wrote:
Walaa wrote:
Aren't the underscores get removed when you map new entities form the catalog explorer?


(I got to the customer area and got the latest build of the designer - same result)

Yes, the underscores are being removed when I map the new entities from the catalog explorer. But why? I have the setting set to false (the default is true) and so I expect underscores to NOT be removed.

I can't reproduce it. v4.2 latest build (but this code hasn't been changed lately). I have two FK fields in an entity, FK_ID1 and FK_ID2, if I add the entity and also its PK side as entities to the project using reverse engineering I get Fk_Id1 and Fk_Id2 as entity fields. Make element name pascal casing    is true, Remove underscores from element name is false in the project settings. I use the default fk pattern, which isn't used here btw.

Quote:

However, I realize now that my fields with underscores are being renamed because they are FKs and subject to the FK field naming pattern. So, I think it is behaving as expected.

It sure would be nice if the FK field naming pattern included an option to just leave the field name alone and not rename it. We have a convention for naming FK fields which cannot be duplicated with the LLBLGen naming pattern tokens.

The FK field pattern isn't used in reverse engineering, it's used when FK fields are auto-created when you add a new relationship and no fk field is present yet.

I've attached the project I used which doesn't reproduce it. Simply reverse engineer FkSide and PkSide. The DB schema is some scratchpad db with garbage tables,
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Emmanuel
User



Location:
Ottawa, Canada
Joined on:
13-Jan-2006 23:14:31
Posted:
167 posts
# Posted on: 17-Jun-2015 15:40:47.  
Otis wrote:
Emmanuel wrote:
Walaa wrote:
Aren't the underscores get removed when you map new entities form the catalog explorer?


(I got to the customer area and got the latest build of the designer - same result)

Yes, the underscores are being removed when I map the new entities from the catalog explorer. But why? I have the setting set to false (the default is true) and so I expect underscores to NOT be removed.

I can't reproduce it. v4.2 latest build (but this code hasn't been changed lately). I have two FK fields in an entity, FK_ID1 and FK_ID2, if I add the entity and also its PK side as entities to the project using reverse engineering I get Fk_Id1 and Fk_Id2 as entity fields. Make element name pascal casing    is true, Remove underscores from element name is false in the project settings. I use the default fk pattern, which isn't used here btw.

Quote:

However, I realize now that my fields with underscores are being renamed because they are FKs and subject to the FK field naming pattern. So, I think it is behaving as expected.

It sure would be nice if the FK field naming pattern included an option to just leave the field name alone and not rename it. We have a convention for naming FK fields which cannot be duplicated with the LLBLGen naming pattern tokens.

The FK field pattern isn't used in reverse engineering, it's used when FK fields are auto-created when you add a new relationship and no fk field is present yet.

I've attached the project I used which doesn't reproduce it. Simply reverse engineer FkSide and PkSide. The DB schema is some scratchpad db with garbage tables,


Thanks. You're correct. I had "Emit foreign key fields" set to false and was looking at Navigator fields which, coincidentally, had the same construction pattern as my tables' FK fields but without the underscore so I mistook those for FK fields that had had their underscores removed.


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.