build errors! field is transient when in fact its not!

8 posts, 1 answers
  1. Brian
    Brian avatar
    35 posts
    Member since:
    Dec 2007

    Posted 11 Mar 2010 Link to this post

    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!!!! 
  2. Brian
    Brian avatar
    35 posts
    Member since:
    Dec 2007

    Posted 11 Mar 2010 Link to this post

    this happend after I added the Domain Model to the library... I've also deleted it with no luck...
  3. DevCraft banner
  4. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 12 Mar 2010 Link to this post

    Yup, I also have this problem. When I don't use the .rlinq model, but just the reverse engineering... -Daniel-
  5. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 12 Mar 2010 Link to this post

    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.
  6. Answer
    Ady
    Admin
    Ady avatar
    589 posts

    Posted 12 Mar 2010 Link to this post

    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.
  7. Richard Pense
    Richard Pense avatar
    12 posts
    Member since:
    Apr 2009

    Posted 12 Mar 2010 Link to this post

    Where do you undo adding a Visual Design Model to your project.  I need forward mapping.
    Thanks,
    Rick
  8. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 12 Mar 2010 Link to this post

    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-
  9. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 12 Mar 2010 Link to this post

    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.
Back to Top
DevCraft banner