bug: globally unique class-names (or feature: namespaces)

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Posts: 148
Joined: Tue 13 Dec 2011 22:58
Location: Ithaca, NY

bug: globally unique class-names (or feature: namespaces)

Post by mindplay » Thu 26 Jan 2012 19:54

Not sure whether to report this as a bug or a feature request.

The issue is this: I have two classes with the same name, in different namespaces.

(I could give a long explanation why - but if you'll take my word that there's a real practical reason to have classes with the same name in different namespaces, it's not really central to understanding the issue... suffice to say, namespaces exist for the same reason.)

ED does not permit this - while it does provide a Namespace property, this is not taken into account, and it enforces globally unique class-names, across the entire model.

A while back, I submitted a feature request, asking about support for nested classes - I have come to realize that this is not really necessary, and in fact might cause some issues with partial classes.

Support for namespaces, on the other hand, is important - and can be used to solve essentially the same problem I was solving with nested classes: a logical grouping of a set of classes.

What I would propose, is you allow the "." character in class-names, in the model.

This feature should not replace the Namespace property, but should work together with it. So if you have a class named "Communications.Fax" in the namespace "MyApp", the generated class would have the fully qualified name "MyApp.Communications.Fax".

I hope this would be a straightforward way to correct the problem?

For now I'm stuck having to use very long class-names with prefixes, which isn't a solution I like for the long run...

Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 27 Jan 2012 10:58

We will investigate the issue and post here about the results.

Post Reply