Bug with [Column(IsDbGenerated=false)] ?

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
dom mohl
Posts: 2
Joined: Mon 21 Jun 2010 09:51

Bug with [Column(IsDbGenerated=false)] ?

Post by dom mohl » Mon 21 Jun 2010 09:54

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"}

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 24 Jun 2010 15:01

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.

dom mohl
Posts: 2
Joined: Mon 21 Jun 2010 09:51

Post by dom mohl » Mon 28 Jun 2010 11:14

[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.

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 30 Jun 2010 14:31

We have answered you by e-mail.

Post Reply