This is a migrated thread and some comments may be shown as answers.

Cross Namespace Reference

2 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David Hollins
Top achievements
Rank 1
David Hollins asked on 31 Jul 2010, 03:28 AM
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 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 04 Aug 2010, 09:53 PM
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
0
David Hollins
Top achievements
Rank 1
answered on 06 Aug 2010, 06:50 PM
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.
Tags
General Discussions
Asked by
David Hollins
Top achievements
Rank 1
Answers by
Alexander
Telerik team
David Hollins
Top achievements
Rank 1
Share this question
or