This question is locked. New answers and comments are not allowed.
New project, using VS2010 with ORM 2010.1.527 for the first time (previously VS2008 w/ 2009.3.1119)
Trying a simple one-to-many class... and (suddenly) getting the following when trying to compile:-
Error 1 OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. The field 'colour' of class 'Meta.Catalogue.Product' uses the db-ref extension, but the referenced class 'Meta.Catalogue.Colour' does not use application identity. --> C:\Development\Meta\Meta\bin\Debug\Meta.dll:(resource)Meta.App.config:mapping-id=mssqlMapping/namespace[Meta.Catalogue]/class[Product]/field[colour]/db-ref="id" MetaWeb
Here are relevant bits of code (only sections provided):
App.config:-
<class name="Product">
<extension key="db-table-name" value="metaCatalogueProduct" />
<extension key="db-key-generator" value="AUTOINC" />
<field name="colour">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="colour_id" />
</extension>
</extension>
</field>
<field name="finish">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="finish_id" />
</extension>
</extension>
</field>
<field name="size">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="size_id" />
</extension>
</extension>
</field>
<field name="style">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="style_id" />
</extension>
</extension>
</field>
</class>
...
<class name="Colour">
<extension key="db-table-name" value="metaCatalogueColour" />
<extension key="db-key-generator" value="AUTOINC" />
</class>
Product class:
using Telerik.OpenAccess;
namespace Meta.Catalogue
{
[Persistent(IdentityField = "id")]
public class Product
{
private int id;
[FieldAlias("id")]
public int ID
{
get { return id; }
set { id = value; }
}
private Style style;
[FieldAlias("style")]
public Style Style
{
get { return style; }
set { style = value; }
}
private Colour colour;
[FieldAlias("colour")]
public Colour Colour
{
get { return colour; }
set { colour = value; }
}
...
Colour class:
using Telerik.OpenAccess;
namespace Meta.Catalogue
{
[Persistent(IdentityField = "id")]
public class Colour
{
private int id;
[FieldAlias("id")]
public int ID
{
get { return id; }
set { id = value; }
}
private string name;
[FieldAlias("name")]
public string Name
{
get { return name; }
set { name = value; }
}
}
}
I've searched for this error message, and cannot find anything
Thanks in advance for any help anyone can provide.
Trying a simple one-to-many class... and (suddenly) getting the following when trying to compile:-
Error 1 OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. The field 'colour' of class 'Meta.Catalogue.Product' uses the db-ref extension, but the referenced class 'Meta.Catalogue.Colour' does not use application identity. --> C:\Development\Meta\Meta\bin\Debug\Meta.dll:(resource)Meta.App.config:mapping-id=mssqlMapping/namespace[Meta.Catalogue]/class[Product]/field[colour]/db-ref="id" MetaWeb
Here are relevant bits of code (only sections provided):
App.config:-
<class name="Product">
<extension key="db-table-name" value="metaCatalogueProduct" />
<extension key="db-key-generator" value="AUTOINC" />
<field name="colour">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="colour_id" />
</extension>
</extension>
</field>
<field name="finish">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="finish_id" />
</extension>
</extension>
</field>
<field name="size">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="size_id" />
</extension>
</extension>
</field>
<field name="style">
<extension key="db-ref" value="id">
<extension key="db-column">
<extension key="db-column-name" value="style_id" />
</extension>
</extension>
</field>
</class>
...
<class name="Colour">
<extension key="db-table-name" value="metaCatalogueColour" />
<extension key="db-key-generator" value="AUTOINC" />
</class>
Product class:
using Telerik.OpenAccess;
namespace Meta.Catalogue
{
[Persistent(IdentityField = "id")]
public class Product
{
private int id;
[FieldAlias("id")]
public int ID
{
get { return id; }
set { id = value; }
}
private Style style;
[FieldAlias("style")]
public Style Style
{
get { return style; }
set { style = value; }
}
private Colour colour;
[FieldAlias("colour")]
public Colour Colour
{
get { return colour; }
set { colour = value; }
}
...
Colour class:
using Telerik.OpenAccess;
namespace Meta.Catalogue
{
[Persistent(IdentityField = "id")]
public class Colour
{
private int id;
[FieldAlias("id")]
public int ID
{
get { return id; }
set { id = value; }
}
private string name;
[FieldAlias("name")]
public string Name
{
get { return name; }
set { name = value; }
}
}
}
I've searched for this error message, and cannot find anything
Thanks in advance for any help anyone can provide.