Cross Namespace Reference

Thread is closed for posting
3 posts, 0 answers
  1. David Hollins
    David  Hollins avatar
    15 posts
    Member since:
    Dec 2009

    Posted 30 Jul 2010 Link to this post

    I want to split my domain library up into some multiple libraries (i.e. core, sub) and have each library have its own mapping configuration file.  The problem I have is that some of the objects in my sub library references some of the core objects.  I thought Open Access would be able to handle this given the reference keyword in the config file but it isn't the case.  It complains of referencing non persistent classes.  Here is the error:

       Make this field [Transient] as it is refers to a Non-Persistent 
    class of a Non-Supported Type.

    Anyone have a workaround/solution for this?
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 04 Aug 2010 Link to this post

    Hello David Hollins,

    I managed to split a model in two assemblies and it is working as expected. Please find my test project attached (you may need to update the OpenAccess references to compile it on your machine). Basically you can create the whole model in one project and then move the classes to the projects where you would like them to be and maybe change some namespaces. Do not forget to move the App.config mapping configuration along with the classes. The <reference> nodes should be present in the executing project and should point to every project that contains persistent classes.
    Please give the demo project a try and let me know if this is not what you are trying to achieve.

    Regards,
    Alexander
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. David Hollins
    David  Hollins avatar
    15 posts
    Member since:
    Dec 2009

    Posted 06 Aug 2010 Link to this post

    I was able to reproduce the error and it is related to referencing a library which contains an object which contains a reference to itself.

    I have submitted a ticket on the matter, 336123.  It the ticket I have attached an example because I could not attach the example in these forums.
Back to Top