Change NameSpace not done in Entities

4 posts, 0 answers
  1. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 08 Jun 2011 Link to this post

    Hi,

    I have a model, VB, with a namespace set to root.
    I've created the model.
    I change the namespace (via rlinq > show model settings) to not-root, but custom "Entities"
    Save
    Now the diagram vb files have a namespace "Entities", but the entity files doe not...
    (with generate multiple files on)

    Open Access from april.

    Regards,

    Erik

  2. Ralph Waldenmaier
    Admin
    Ralph Waldenmaier avatar
    202 posts

    Posted 08 Jun 2011 Link to this post

    Hi Erik,

    this is the expected behavior. If you change the namespace in your model then only new classes get the new namespace. In order to change the old classes, you can choose the properties dialog for your domain class and set the namespace in the 'Namespace' property.
    Hope this helps.

    All the best,
    Ralph
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  3. DevCraft banner
  4. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 08 Jun 2011 Link to this post

    Hi Ralph,

    I can't reproduce that. First, what's the difference between Model settings and model properties regarding namespace? Second: changing the namespace in settings and/or properties does not change the namespace of the Entities at all...

    (Using VB.)

    Regards,

    Erik
  5. Dimitar Kapitanov
    Admin
    Dimitar Kapitanov avatar
    632 posts

    Posted 13 Jun 2011 Link to this post

    Hi Erik,
    We verified the workflow you've mentioned with our latest May build (2011.1.530.1), which should be visible for you under "Manage your products > Latest Internal Builds". Everything was tested under VB. As far as we are considered everything works "by design", nevertheless let me shed some more light what we believe is the right behavior:

    1. "Show Model Settings..." option - in general those are the settings of the model that is opened. In the specific case of changing the namespace we are closely following the default Visual Studio behavior which is: If the namespace of a project is changed, the already added files are not touched, it will be applicable only for newly added files. Therefore we provide the same behavior - if you change model's namespace globally through the Model Settings, it will not affect the already available classes on the diagram. Only if you add a new class, the new namespace will be picked up.

    2. Changing namespaces via the Properties Pane - This is a trivial operation, and when my college said the "Properties dialog" he reffed actually to the standard VS Properties Pane/Window. You can change there the namespace by selecting the entity in question on the diagram. After that its properties will be selected and displayed in the properties pane. There you will see the namespace property and it is available for edit. To persist the change, you should save the model.



    Best wishes,
    Dimitar Kapitanov
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
Back to Top