This is a migrated thread and some comments may be shown as answers.
build errors! field is transient when in fact its not!
7 Answers 119 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian
Top achievements
Rank 2
Brian asked on 12 Mar 2010, 12:53 AM
I am trying to build my forward mapping class library...

I CAN NO LONGER WITH THIS NEW VERSION OF OPENACCESS

I get a TON of errors similiar to this:

Error 30 The property 'ProductID' of type 'ProductInfo' is declared to be an query alias for field 'productid', but the aliased field is transient and not present in the database. [class=MySite.Biz.ProductInfo] [field=ProductID] MySite.Biz
Error 31 The property 'AttributeID' of type 'Attribute' is declared to be an query alias for field 'attributeid', but the aliased field is transient and not present in the database. [class=MySite.Biz.Attribute] [field=AttributeID] MySite.Biz


I am getting this on every single one of my PrimaryKeys.  They DO in fact exist in the database also.  I have checked the connection strings and they are correct.  I have also tried to turn "UpdateDatabase" to false with no changes.

None of these fields are marked transient!!! They all also have the FieldAlias attribute.

What has happend to OpenAccess!!!! 

7 Answers, 1 is accepted

Sort by
0
Brian
Top achievements
Rank 2
answered on 12 Mar 2010, 12:54 AM
this happend after I added the Domain Model to the library... I've also deleted it with no luck...
0
Daniel Plomp
Top achievements
Rank 2
answered on 12 Mar 2010, 09:54 AM
Yup, I also have this problem. When I don't use the .rlinq model, but just the reverse engineering... -Daniel-
0
Zoran
Telerik team
answered on 12 Mar 2010, 02:18 PM
Hello Daniel,

I would like to point you to a forum thread where we discuss the most common migration scenarios that our customers currently have. I hope you can find your answers there. Nevertheless, I would like to point you that forward mapping functionality is not part of the new designer, but, it will be there for the next version.

All the best,
Zoran
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
Accepted
Ady
Telerik team
answered on 12 Mar 2010, 03:25 PM
Hello Daniel,

 Some additional information: This happens if you add the Domain Model to an already enabled OpenAccess project. Doing so calls the enhancer using slightly different parameters.
In case you need to work with the same project ,because you cannot create a new one, you should unload the project from the solution and open the .csproj file in a editor  and comment out the following line
<Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />. You should find it right at the end of the file

Hope this helps.

Best wishes,
Ady
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
Richard Pense
Top achievements
Rank 1
answered on 12 Mar 2010, 03:28 PM
Where do you undo adding a Visual Design Model to your project.  I need forward mapping.
Thanks,
Rick
0
Daniel Plomp
Top achievements
Rank 2
answered on 12 Mar 2010, 03:38 PM
Hi Ady,

Well, I created a new project, but I cannot use the code you provided earlier.
I'm getting an error:

Cannot find resource Sined.rlinq embedded in assembly Sined.Data.Repository, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

What seems logical to me, since the .rlinq file is inside another project.
How could I access it?

-Daniel-
0
Zoran
Telerik team
answered on 12 Mar 2010, 05:17 PM
Hi Guys,

In such case, you should use the second overload of the FromAssemblyResource method for initializing the XmlMetadataSource.
There you should just point to the assembly where your persistent classes are:
XmlMetadataSource source = XmlMetadataSource.FromAssemblyResource(typeof(Customer).Assembly, "EntityDiagrams1.rlinq");
In this example Customer should just be replaced with one of your persistent classes.

Best wishes,
Zoran
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.
Tags
General Discussions
Asked by
Brian
Top achievements
Rank 2
Answers by
Brian
Top achievements
Rank 2
Daniel Plomp
Top achievements
Rank 2
Zoran
Telerik team
Ady
Telerik team
Richard Pense
Top achievements
Rank 1
Share this question
or