BUG: EntityModel Does Not Leverage Namespace

4 posts, 0 answers
  1. Fred Lackey
    Fred Lackey avatar
    7 posts
    Member since:
    Jul 2012

    Posted 22 May 2012 Link to this post

    Although the Entity Model wizard prompts to "Use the project namespace," none of the entities are actually generated within the namespace.  Instead, they all appear within the root namespace.  In order to apply the namespace, the user must manually select the object, within the designer, and prepend the project's namespace value to the "Namespace" property in the property grid.  Please update the wizard to generate the actual entities in the following namespace if selected within the wizard:

    <%PROJECT NAMESPACE%>.<%SCHEMA NAME%>.<%ENTITY NAME%> 

    Thanks,
    Fred Lackey
    www.FredLackey.com
  2. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 24 May 2012 Link to this post

    Hello Fred,

    Thank you for your suggestion.

    I would like to point out the behaviour of the wizard when "Use the project namespace" option is selected is correct.  Your suggestion about the format of the entity type full name when DB Schema name is considered is very useful and convenient. For time being the full name in that case will be <SCHEMA NAME>.<ENTITY NAME>. You can enable this name generation pattern by checking "Use schema names for namespaces" checkbox on "Choose Database Items" step of the wizard. Keep in mind that the default "dbo" schema is treated as empty string and the wizard will use the project namespace instead.

    We are considering your request for implementation, but due to the fact that there could be production code using the existing naming approach we will need additional time to decide on the best way to introduce the new naming convention. This means we most like will not be able to implement your request for the incoming release in the beginning of June.

    Meanwhile you can use OpenAccess Batch Operations tool for mass rename/change of namespace of your types. You can find more information about this tool in our online documentation.

     In order to do that you can:
    1. Open your RLINQ file;
    2. Right click on the design surface and select Batch Operations... from the context menu
    3. Select from Operations combobox in the right panel : Change Namespace
    4. Enter the new namespace
    5. Select one or many entity row from the grid as targets of the operation
    6. Press Execute button
    7. Save the RLINQ file and rebuild your solution

    If you would like to add any details about your feature request, have another suggestion or need assistance do not hesitate to contact us.


     Greetings,
    Viktor Zhivkov
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
  3. DevCraft banner
  4. Fred Lackey
    Fred Lackey avatar
    7 posts
    Member since:
    Jul 2012

    Posted 24 May 2012 Link to this post

    Thanks for replying.  Although I appreciate the information, I would ask you to review the wizard.  I've created a small video to help convey the problem / request / bug.  I hope this helps...

    BUG: Telerik ORM Ignores Project Namespace

    As of build 2012.1.427.1 (internal build) the wizard essentially IGNORES the project namespace when the "use namespace" option is selected.  This is misleading.  Thee option should ENHANCE OR EXTEND the namespace instead of just simply replacing it.

    Without the option selected, the namespace for ALL classes is:  MyProject.Data
    WITH the option selected, the namespace for ENTITIES is: MySchema
    A better solution for this option would be:  MyProject.Data.MySchema

    Again, please see the requested video.  If this is NOT classified as a bug, then please accept this as a request to change it.  Nobody would ever ABANDON the project namespace... especially for a handful of objects.

    Thanx,
    Fred
  5. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 25 May 2012 Link to this post

    Hello Frederic,

     Thanks a lot for the effort you have done in explaining the issue as thoroughly as you did with your video. I must say, I agree with your point there and this request will be put on the discussion table in our team for the next Q release. 

    I believe you must agree with the statement that we really can't execute this one quickly before the current Q2 release, because this feature is available with the current behavior for more than 2 years, and we have to be very careful not to introduce any Backward Compatibility problems for our existing customers that use it. At the same time we should also make sure we do not introduce a complex UI where you have too many options for tweaking your namespace.

    In the meantime, I am sure that Viktor's reply in this thread should really give you a workaround solution so you can continue your project having the namespace that you would like to have and not changing each entity manually using the properties window.

    All the best,
    Zoran
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Back to Top