I am trying to follow the instructions found here http://www.devart.com/linqconnect/docs/Inheritance.html to create a Table-Per-Hierarchy mapping. However, I am not able to see any of the discriminator settings.
Here is what the instructions show:
And here is what I actually see:
Any help would be appreciated! Thanks
Search found 14 matches
- Thu 18 Oct 2012 19:06
- Forum: Entity Developer
- Topic: Table per Hierarchy Discriminator Property Missing
- Replies: 1
- Views: 1099
- Wed 02 Mar 2011 13:23
- Forum: dotConnect for Oracle
- Topic: Bug report - OracleDbType to DbType not consistant
- Replies: 6
- Views: 2049
- Tue 11 Jan 2011 15:39
- Forum: dotConnect for Oracle
- Topic: Cavenous Performance Difference - Direct and Native
- Replies: 3
- Views: 1159
Cavenous Performance Difference - Direct and Native
Hi
I am using dotConnect for Oracle in a reporting application. One of the people who designs the reports complained that SQL she can run in < 1 second in SQL developer, takes more than a minute when used in a report.
I timed the datatable being filled by the report and saw that it was taking more than a minute.
I then decided to change the connection type to direct and saw that the fill took < 1 second for the exact same report/code/sql.
I do not believe that such a large discrepency is intended. Hopefully this is just a known issue with the version of dotConnect for Oracle being used: 5.70.170.0
I am using dotConnect for Oracle in a reporting application. One of the people who designs the reports complained that SQL she can run in < 1 second in SQL developer, takes more than a minute when used in a report.
I timed the datatable being filled by the report and saw that it was taking more than a minute.
I then decided to change the connection type to direct and saw that the fill took < 1 second for the exact same report/code/sql.
I do not believe that such a large discrepency is intended. Hopefully this is just a known issue with the version of dotConnect for Oracle being used: 5.70.170.0
- Wed 03 Nov 2010 15:59
- Forum: dotConnect for Oracle
- Topic: Bug report - OracleDbType to DbType not consistant
- Replies: 6
- Views: 2049
- Mon 01 Nov 2010 18:31
- Forum: dotConnect for Oracle
- Topic: Bug report - OracleDbType to DbType not consistant
- Replies: 6
- Views: 2049
Bug report - OracleDbType to DbType not consistant
I have a column in my table defined as:
As far as I can tell NUMBER should map to DbType Int64.
When I create an entity model containing this table, the entity does indeed have a TREE_LEVEL property with of type Int64.
When I manually fetch the data using an OracleDataReader the DbType of the column is double.
I can provide code samples if reproducing this is a problem.
Code: Select all
"TREE_LEVEL" NUMBER(10,0) DEFAULT 1
When I create an entity model containing this table, the entity does indeed have a TREE_LEVEL property with of type Int64.
When I manually fetch the data using an OracleDataReader the DbType of the column is double.
I can provide code samples if reproducing this is a problem.
- Fri 23 Jul 2010 14:52
- Forum: Entity Framework support
- Topic: Linq to Entity and Dictionary
- Replies: 4
- Views: 3668
- Fri 16 Jul 2010 16:43
- Forum: dotConnect for Oracle
- Topic: Problem With CreateQuery<>
- Replies: 1
- Views: 2186
Problem With CreateQuery<>
I don't seem to be able to use QueryCreate. I have the following code:
This results in the error:
"The query syntax is not valid., near term '*', line 1, column 11."
This one is driving me crazy!
Code: Select all
using (Entities ent = new Entities())
{
String sql = string.Format(@"SELECT * FROM tm_fnet");
var results = ent.CreateQuery(sql);
foreach (var row in results)
{
RTTrace.WriteLine(this.TraceName, "id " + row.ID.ToString());
}
}
"The query syntax is not valid., near term '*', line 1, column 11."
This one is driving me crazy!
- Fri 16 Jul 2010 16:38
- Forum: dotConnect for Oracle
- Topic: Parameter Problem when Using Union
- Replies: 4
- Views: 1158
- Sun 11 Jul 2010 17:56
- Forum: dotConnect for Oracle
- Topic: Parameter Problem when Using Union
- Replies: 4
- Views: 1158
Parameter Problem when Using Union
I have the following code which I think exposes a bug:
Which results in the following SQL statement:
All is well expect for the values assigned to the parameters :p_linq_0 and p_linq_1, for some reason both of these values are 330.
Code: Select all
Dictionary> Lookup = new Dictionary>();
Lookup.Add(200, new List() { 0, 1, 2 });
Lookup.Add(330, new List() { 0, 1, 4 });
using (Entities ent = new Entities())
{
IQueryable query = null;
foreach (var x in Lookup)
{
var queryPart = from t in ent.TM_FNET
where t.ACTION.Value == x.Key
&& x.Value.Contains(t.STATUS.Value)
select t.ID;
//first one becomes the main query, subsequent ones union-ed on...
if (query == null)
query = queryPart;
else
query = query.Union(queryPart);
}
foreach (var f in query.ToList())
{
Console.WriteLine("{0}", f);
}
}
Code: Select all
SELECT
"Distinct1".C1 AS C1
FROM ( SELECT DISTINCT
"UnionAll1".ID AS C1
FROM (SELECT
"Extent1".ID AS ID
FROM TMDDBA.TM_FNET "Extent1"
WHERE ("Extent1".ACTION = :p__linq__0) AND (((0 = "Extent1".STATUS) OR (1 = "Extent1".STATUS)) OR (4 = "Extent1".STATUS))
UNION ALL
SELECT
"Extent2".ID AS ID
FROM TMDDBA.TM_FNET "Extent2"
WHERE ("Extent2".ACTION = :p__linq__1) AND (((0 = "Extent2".STATUS) OR (1 = "Extent2".STATUS)) OR (4 = "Extent2".STATUS))) "UnionAll1"
) "Distinct1"
- Fri 09 Jul 2010 18:18
- Forum: Entity Framework support
- Topic: Linq to Entity and Dictionary
- Replies: 4
- Views: 3668
Linq to Entity and Dictionary
I have the following code that compiles but throws an error on execution:
The linq query that is commented out works perfectly but the active one fails with the following error:
Is this a bug, a limitation, or my idiocy?
Thanks!
Code: Select all
Dictionary> Lookup = new Dictionary>();
//Used in my commented out Linq Query
List Status = new List() { 0, 1, 2, 4 };
Lookup.Add(200, new List() { 0, 1, 2 });
Lookup.Add(330, new List() { 0, 1, 4 });
using (Entities ent = new Entities())
{
try
{
//var result = from d in ent.TM_FNET
// where Lookup.Keys.Contains(d.ACTION.Value)
// && Status.Contains(d.STATUS.Value)
// select d;
var result = from d in ent.TM_FNET
where Lookup.Keys.Contains(d.ACTION.Value)
&& Lookup[d.ACTION.Value].Contains(d.STATUS.Value)
select d;
foreach (var f in result)
{
Console.WriteLine("{0} -- {1} -- {2}", f.ACTION, f.ID, f.STATUS);
}
Console.WriteLine("Finished");
Console.ReadKey();
}
catch
{
}
}
What I'm expecting is linq to translate the query into something like the following:LINQ to Entities does not recognize the method 'System.Collections.Generic.List`1[System.Decimal] get_Item(System.Decimal)' method, and this method cannot be translated into a store expression.
Code: Select all
SELECT
*
FROM
tm_fnet
WHERE
(ACTION = 200 AND STATUS IN (0,1,2))
OR
(ACTION = 330 AND STATUS IN (0,1,4));
Thanks!
- Fri 07 May 2010 17:54
- Forum: dotConnect for Oracle
- Topic: dotConnect Doesn't See Relation
- Replies: 6
- Views: 1454
- Mon 03 May 2010 21:48
- Forum: dotConnect for Oracle
- Topic: dotConnect Doesn't See Relation
- Replies: 6
- Views: 1454
- Mon 03 May 2010 14:57
- Forum: dotConnect for Oracle
- Topic: dotConnect Doesn't See Relation
- Replies: 6
- Views: 1454
dotConnect Doesn't See Relation
I have a table defined with a self referencing relationship. The table has an ID column and a PARENT_ID column. ID is the primary key, PARENT_ID is the foreign key and is set to reference the primary key in this same table
Both the ".net Framework Data Provider for Oracle" (System.Data.OracleClient) and "ODP.Net (Oracle.DataAccess)" systems are able to create the table in my dataset with the relation correctly implemented. When using dotConnect the table is created with no relations whatsoever.
Both the ".net Framework Data Provider for Oracle" (System.Data.OracleClient) and "ODP.Net (Oracle.DataAccess)" systems are able to create the table in my dataset with the relation correctly implemented. When using dotConnect the table is created with no relations whatsoever.
- Fri 23 Jan 2009 18:35
- Forum: dotConnect for Oracle
- Topic: Oracle Error 01453 When Using Entity Framework
- Replies: 3
- Views: 2899
Oracle Error 01453 When Using Entity Framework
Hi
I use the following function to save changes made to my detached entity objects. I have multiple threads running and I quickly run out of database connections if I don't use the mutex.
The application runs fine for a while until I eventually get the following error:
If the number of threads accessing the function is kept low (<10) things seem to be stable, only when the thread count goes up do I encounter problems.
Can anyone help?
I use the following function to save changes made to my detached entity objects. I have multiple threads running and I quickly run out of database connections if I don't use the mutex.
Code: Select all
public static void SaveFlashnetChanges(EntityKey ek, EntityObject FlashNetObject)
{
mtx1.WaitOne();
using (Entities ent = new Entities(EntitySharedConnection.SharedConnection))
{
object FNET_ORIG = null;
try
{
if (ent.TryGetObjectByKey(ek, out FNET_ORIG))
{
ent.ApplyPropertyChanges(ek.EntitySetName, FlashNetObject);
}
ent.SaveChanges();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
mtx1.ReleaseMutex();
}
Code: Select all
Unhandled Exception: System.Data.EntityException: An error occurred while starting a transaction on the provider connection. See the inner exception for details. ---> Devart.Data.Oracle.OracleException: ORA-01453: SET TRANSACTION must be first statement of transaction
at Devart.Data.Oracle.al.b(Int32 A_0)
at Devart.Data.Oracle.an.e(Int32 A_0)
at Devart.Data.Oracle.an.a(Int32 A_0, a1 A_1)
at Devart.Data.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
at Devart.Data.Oracle.OracleTransaction..ctor(OracleConnection A_0, IsolationLevel A_1)
at Devart.Data.Oracle.OracleConnection.BeginTransaction(IsolationLevel il)
at Devart.Data.Oracle.OracleConnection.b(IsolationLevel A_0)
at System.Data.Common.DbConnection.BeginTransaction(IsolationLevel isolationLevel)
at System.Data.EntityClient.EntityConnection.BeginDbTransaction(IsolationLevel isolationLevel)
--- End of inner exception stack trace ---
at System.Data.EntityClient.EntityConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.Common.DbConnection.BeginTransaction()
at System.Data.EntityClient.EntityConnection.BeginTransaction()
at System.Data.Objects.ObjectContext.SaveChanges(Boolean acceptChangesDuringSave)
at System.Data.Objects.ObjectContext.SaveChanges()
at ConsoleApplication1.Program.SubmitNewTasks() in C:\Projects\ConsoleApplication1.EntityData\ConsoleApplication1\Program.cs:line 41
at ConsoleApplication1.Program.Main(String[] args) in C:\Projects\ConsoleApplication1.EntityData\ConsoleApplication1\Program.cs:line 21
Can anyone help?