Bug with [Column(IsDbGenerated=false)] ?

Bug with [Column(IsDbGenerated=false)] ?

Postby 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"}
dom mohl
 
Posts: 2
Joined: Mon 21 Jun 2010 09:51

Postby 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.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Postby 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.
dom mohl
 
Posts: 2
Joined: Mon 21 Jun 2010 09:51

Postby Shalex » Wed 30 Jun 2010 14:31

We have answered you by e-mail.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44


Return to LinqConnect (LINQ to SQL support)