Page 1 of 1

Bug with [Column(IsDbGenerated=false)] ?

Posted: Mon 21 Jun 2010 09:54
by dom mohl
Hi

DB – Oracle 10.1
Windows 7 (64) + Visual Studio 2010 + dotconnect 5.7.140

I Exteded my class as folowwing

[Column(IsDbGenerated=false)]
public partial class Customer
{
[Column(IsDbGenerated=false)]
public Guid ID
{
get { return (string.IsNullOrEmpty(CustomerID) ? Guid.Empty : Guid.Parse(CustomerID)); }
set { CustomerID = value.ToString(); }
}
}

If I execute the linq query on customers I get LinqCommandExecutionException

InnerException: {"ORA-00904: \"T1\".\"ID\": invalid identifier"}

Posted: Thu 24 Jun 2010 15:01
by Shalex
Why did you place the [Column(IsDbGenerated=false)] attribute before the class and property definitions? Please remove them. Probably, if you extended your class with this property, there is no column in the database associated with this property. Engine is looking for the same column if you set this attribute.

Posted: Mon 28 Jun 2010 11:14
by dom mohl
[Column] before class is a typo, i put it because the Property is not mapped to a column, if I ommit it i get the exceptions cliaming no metadata found for the column.

Posted: Wed 30 Jun 2010 14:31
by Shalex
We have answered you by e-mail.