home recent topics recent posts search register faq   AspNetForum v.4.8.2.0

Huagati Systems Support Forum :: Forum

user:
psw:
| lost password
Home » Huagati DBML/EDMX Tools Support » Property Renaming Messages in this topic - RSS
11/14/2009 1:46:40 PM
moneill
Posts 17
More dumb questions, I suspect there may be more as I get used to the tool

I hvae created the DBML with and Entity Location with LocationID as a property , I now use the tool to rename and check the Remove Leading Entity Name and "Standardise" again , then I get ID

If I now uncheck the Remove Leading Entity Name and "Standardise" again, should I expect the reversal to LocationID , because I don't

Similarly if I uncheck the Capitalise 2 Char endings , I get Id , but unchecking and "Standardise" again does not restore the ID

I suppose the question is , is the renamaing a one way street , get it right first time and no going back ?

I am using Codesmith set up with the same property settings to generate the Manager classes I need to sync with the naming conventions in your tool , so it would be a good thing to be able to re name repeatedly to get a match

Or am I missing something ?

Mike
11/14/2009 1:54:06 PM
Kristofer
Posts 240
Hi Mike,

Which version are you using? The renaming feature used to use the current name as the base, but as of version 1.81 (just released yesterday), it allows you to choose if you want the renaming feature to use the current name, or the db object's name as the base name. That allows you to reverse the effects of "remove leading entity name" and other renaming features...

See the highlighted part tagged with a red 1 in this screenshot: (ignore the other highlighted parts as they were highlighted for another question...)



Best regards,
Kristofer
edited by Kristofer on 11/14/2009
11/15/2009 12:31:01 PM
moneill
Posts 17
You read my mind

I just upgraded to 1.81 and all my questions are answered

I love the way you are actively adding features to this tool at users requests , normally it takes months is ever to get some companies to add features .

Does the tool self detect upgrades or do I have to keep an eye open for changes

Cheers
11/15/2009 12:31:02 PM
moneill
Posts 17
You read my mind

I just upgraded to 1.81 and all my questions are answered

I love the way you are actively adding features to this tool at users requests , normally it takes months is ever to get some companies to add features .

Does the tool self detect upgrades or do I have to keep an eye open for changes

Cheers
11/15/2009 3:00:50 PM
moneill
Posts 17
The next little snag , I work in the brewing industry and we use the term Process & Equipment regularly . I have a table called Process & Equipment

When I create a complete blank dbml and drag the Process Table on , it creates by native Linq 2 sql Processes , intellegent eh ?

public System.Data.Linq.Table<Process> Processes
{
get
{
return this.GetTable<Process>()
}
}

in the designer class .

In my CodeSmith stuff I can compnsate for this with special cases , eg Process Equipment etc that I can hard or soft code

How can I do this with your tool. Is it possible to have a set of "exception names" that are not pluralised ,maybe as a List Box a user can customise , then on renaming leave these special case out of the mix and simply use the DB Name

If I singularise Process with the tool I get Proces , If I pluralize I get Processes , but never Process ??

I can get around it by renaming tables but this isn't ideal as its such "bog standard" terminology in my industry

v 1.81

Cheers

Mike
11/16/2009 2:21:39 AM
Kristofer
Posts 240
moneill wrote:
You read my mind

I just upgraded to 1.81 and all my questions are answered

I love the way you are actively adding features to this tool at users requests , normally it takes months is ever to get some companies to add features .

Does the tool self detect upgrades or do I have to keep an eye open for changes

Cheers


Just lucky timing.

It has a version checker mechanism, so every now and then (3-5 day intervals) it will check if there is a newer version available and will prompt and ask if you want to download the update.
11/16/2009 2:26:10 AM
Kristofer
Posts 240
moneill wrote:

How can I do this with your tool. Is it possible to have a set of "exception names" that are not pluralised ,maybe as a List Box a user can customise , then on renaming leave these special case out of the mix and simply use the DB Name

If I singularise Process with the tool I get Proces , If I pluralize I get Processes , but never Process ??

I can get around it by renaming tables but this isn't ideal as its such "bog standard" terminology in my industry


It has an extensibility feature allowing you to plug in custom code for name rules and for pluralization/singularization. There is a code sample for that in this thread: http://forum.huagati.com/topic74-customizing-table-names.aspx#post290 , and the extensibility interface itself is documented here: http://www.huagati.com/dbmltools/ExtensibilityHelp/

However, I see that it can be a bit of overkill to use that if there are just a handful of names to override, so I will look into adding a built-in 'exception list' to a future version...
edited by Kristofer on 11/16/2009
11/17/2009 3:31:40 AM
moneill
Posts 17
And next ---- are you treating Option as a KeyWord ?, I get Option1 when I rename , I use the table for application options so I could easily rename it .

If yes out of interest why , I assume as a VB Keyword Clash , in C# I nver thought about that

Mike
11/17/2009 3:58:06 AM
Kristofer
Posts 240
Yes, by default it avoids both C# and VB keywords. This is because although an assembly is developed in one language it may be consumed/used from other languages.

There is a semi-'hidden' setting for turning this off in the [dbmlfile].namePrefs file. Each one of the sections EntitySetPrefs, EntityTypePrefs, PropertyPrefs, and ProcedurePrefs have two properties controlling if C# keywords and/or VB keywords should be allowed as identifier names or not:

<AllowCSKeywords>false</AllowCSKeywords>
<AllowVBKeywords>false</AllowVBKeywords>

If you want to allow VB keywords, you can edit that file with notepad and change all four AllowVBKeywords from false to true.
11/17/2009 4:33:33 AM
moneill
Posts 17
Got there .... I have finally set it up With None as the pluralisation in all 3 cases , but this is a new Db and the naming convention is "good", when you get to an old and possibly not so "perfectly named" the fun starts

One "final" question ?

To be totally flexible should there not be 3 renamings independently

The Entity itslef say Process
The EntitySet as such as a Property of an Entity by Foreign Key eg Process.Materials
The Table iself in the Context eg public System.Data.Linq.Table<Process> Process

Now that would be the icing on the cake

Mike
11/17/2009 4:50:19 AM
Kristofer
Posts 240
moneill wrote:
To be totally flexible should there not be 3 renamings independently

The Entity itslef say Process
The EntitySet as such as a Property of an Entity by Foreign Key eg Process.Materials
The Table iself in the Context eg public System.Data.Linq.Table<Process> Process


Yes, it would make sense to have a separate rule tab for navigation properties (associations/FKs) in addition to the current ones. I'll look into that for a future version.
1/13/2010 2:44:23 PM
iolaus
Posts 2
The ability to make property naming exclusions would be great. Perhaps the ability to manually define a renaming would be even better?

We've been having an issue that I think is due to Huagati naming standardization altering the <Column Storage=""> value in the .dbml where renaming through VS doesn't seem to.

Here is an example of where this has been a problem...

We have a table name "Address" with fields:

Address1
Address2
Address3

If I check "Remove leading entity name" on the "Entity Members" tab the properties are renamed:

_1
_2
_3

This is understandable, however, when I manually rename the properties back to their original form using the Visual Studio dbml editor, the class fields don't get renamed and still have the underscore.
1/30/2010 4:13:10 PM
moneill
Posts 17
Hi Kristopher

Did you give any more thought to splitting the naming conventions 3 ways as above , it would really make life a lot easier

Cheers

Mike
2/2/2010 12:34:31 PM
Kristofer
Posts 240
moneill wrote:
Hi Kristopher

Did you give any more thought to splitting the naming conventions 3 ways as above , it would really make life a lot easier

Cheers

Mike


Hi Mike,

Yes, it is planned for an upcoming release along with [codeless] pluralization/singularization overrides.

Best regards,
Kristofer
pages: 1
|

Home » Huagati DBML/EDMX Tools Support » Property Renaming