Unused return shapes

4 posts, 1 answers
  1. Doron
    Doron avatar
    8 posts
    Member since:
    Apr 2013

    Posted 10 Jul 2013 Link to this post

    Is there a way to clear an unused return shape when i remove its domain method?

    or some way to easily identify such unused return shapes so i can remove them manually?
  2. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 12 Jul 2013 Link to this post

    Hello,

    The easiest way to permanently delete the result set of a domain method that is removed from the context is in Model Object Explorer. I would suggest to you the following workflow:

    1. Open the domain model in Visual Designer and navigate to Model Object Explorer
    2. Expand the Domain Methods Return Shapes node
    3. Right-click on the type you want to delete (you can select more then one type at once) and select Delete
    4. Save the .rlinq file

    Note that, once the domain model is saved after the types are removed, OpenAccess ORM will remove the generated .cs\.vb files and if these types are already used in your code, you will experience build errors.

    Regarding the distinction between used and unused return shapes - currently, when the visual representation in Model Object Explorer is created, OpenAccess ORM does not explicitly check, if the domain method that used to own the return shape still exists. The point here is that even if it does not, that type might be used somewhere in your code. 

    A manual workaround would be to review the Domain Method Return Shape property of the domain methods in (the Domain Methods node) and based on the used return shapes to filter the unused ones.

    I hope this helps. If you have additonal questions, or experience difficulties, do not hesitate to get back to us.


    Regards,
    Doroteya
    Telerik
    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvementsshipped with this release.

  3. DevCraft banner
  4. Doron
    Doron avatar
    8 posts
    Member since:
    Apr 2013

    Posted 31 Jul 2013 Link to this post

    this does NOT answer my question
    i know how to remove it manually - my problem is to identify what should be removed
    when we have several people all defining stored procedures and result shapes in the same model - the fact that when you remove the domain method - you do not remove the return shape that was generated with it means that the model accumulate garbage - how do i identify this garbage?
  5. Answer
    Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 05 Aug 2013 Link to this post

    Hello Doron,

    Excuse me for the inconvenience caused.

    I understand your concerns about garbage accumulation and unfortunately Telerik OpenAccess ORM does not offer a functionality that marks the stored procedure return shapes as used or unused. We appreciate the idea, however, and here is a feature request about the implementation of a visual difference between return shapes which have an owning domain method and such which do not.

    I hope this helps. If you have additional questions, do not hesitate to get back to us.


    Regards,
    Doroteya
    Telerik
    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvementsshipped with this release.

Back to Top