Search found 12 matches
- Tue 24 Mar 2009 15:39
- Forum: dotConnect for PostgreSQL
- Topic: schemas support - still don't work :(
- Replies: 3
- Views: 2003
- Tue 24 Mar 2009 08:00
- Forum: dotConnect for PostgreSQL
- Topic: schemas support - still don't work :(
- Replies: 3
- Views: 2003
schemas support - still don't work :(
Hi!
In our project we use edm-model with designer. I try to place some database tables in separate database schema (all entities in EDM from one schema). Designer works well. But in runtime generated queries still calls to schema "public":(. In SDL all tables has "security" schema - but in runtime schema was ignored
How can I make this works?
In our project we use edm-model with designer. I try to place some database tables in separate database schema (all entities in EDM from one schema). Designer works well. But in runtime generated queries still calls to schema "public":(. In SDL all tables has "security" schema - but in runtime schema was ignored
How can I make this works?
- Fri 21 Nov 2008 08:52
- Forum: dotConnect for PostgreSQL
- Topic: "outer apply" statement
- Replies: 12
- Views: 7263
- Fri 07 Nov 2008 09:23
- Forum: dotConnect for PostgreSQL
- Topic: "outer apply" statement
- Replies: 12
- Views: 7263
hi. look on this code:
it works...
Code: Select all
using (monitoringEntities db = new monitoringEntities())
{
//var q = db.task_sequence.Include("task_sequens_data.time_table.time_table_constraint");
foreach (task_sequence t in db.task_sequence)
{
t.task_sequens_dataReference.Load();
t.task_sequens_data.time_tableReference.Load();
t.task_sequens_data.time_table.time_table_constraint.Load();
Console.WriteLine(t.id_task_sequens);
}
}
- Thu 06 Nov 2008 11:00
- Forum: dotConnect for PostgreSQL
- Topic: "outer apply" statement
- Replies: 12
- Views: 7263
Your advice for dbscript modification doesn’t work, error still appears.
I tested this edm model with SQL Server 2005 and native MS provider, everything works OK. So I can’t understand why it is impossible to construct SQL query from Expression Tree using your provider. And how can I solve my problem?
I tested this edm model with SQL Server 2005 and native MS provider, everything works OK. So I can’t understand why it is impossible to construct SQL query from Expression Tree using your provider. And how can I solve my problem?
- Tue 04 Nov 2008 12:41
- Forum: dotConnect for PostgreSQL
- Topic: "outer apply" statement
- Replies: 12
- Views: 7263
- Fri 31 Oct 2008 15:08
- Forum: dotConnect for PostgreSQL
- Topic: "outer apply" statement
- Replies: 12
- Views: 7263
"outer apply" statement
"outer apply" statement, generated by provider causes an error.
Database script:
pg-log error message:
2008-10-31 16:15:29 EET ERROR: ошибка синтаксиса в или рядом "OUTER" на символе 2555
2008-10-31 16:15:29 EET КОМАНДА: SELECT
"Project1".id_task_sequens AS id_task_sequens,
"Project1".tmp AS tmp,
"Project1".id_task_sequens_data AS id_task_sequens_data,
"Project1".id_task_sequens_data1 AS id_task_sequens_data1,
"Project1".current_operation AS current_operation,
"Project1".fk_probe AS fk_probe,
"Project1"."name" AS "name",
"Project1".id_task_sequens_data2 AS id_task_sequens_data2,
"Project1".id_time_table AS id_time_table,
"Project1".custom_period AS custom_period,
"Project1".number_of_displayed_points AS number_of_displayed_points,
"Project1".priority AS priority,
"Project1"."start" AS "start",
"Project1".stop AS stop,
"Project1".time_table_period AS time_table_period,
"Project1".id_task_sequens_data3 AS id_task_sequens_data3,
"Project1"."C1" AS "C1",
"Project1"."C2" AS "C2",
"Project1"."C3" AS "C3",
"Project3"."C1" AS "C4",
"Project3".id_time_table_constraint AS id_time_table_constraint,
"Project3"."day" AS "day",
"Project3".day_of_week AS day_of_week,
"Project3"."month" AS "month",
"Project3"."time" AS "time",
"Project3".fk_time_table AS fk_time_table
FROM (SELECT
"Extent1".id_task_sequens AS id_task_sequens,
"Extent1".tmp AS tmp,
"Extent2".id_task_sequens_data AS id_task_sequens_data,
"Extent3".id_task_sequens_data AS id_task_sequens_data1,
"Extent3".current_operation AS current_operation,
"Extent3".fk_probe AS fk_probe,
"Extent3"."name" AS "name",
"Extent4".id_task_sequens_data AS id_task_sequens_data2,
"Extent5".id_time_table AS id_time_table,
"Extent5".custom_period AS custom_period,
"Extent5".number_of_displayed_points AS number_of_displayed_points,
"Extent5".priority AS priority,
"Extent5"."start" AS "start",
"Extent5".stop AS stop,
"Extent5".time_table_period AS time_table_period,
"Extent6".id_task_sequens_data AS id_task_sequens_data3,
1 AS "C1",
1 AS "C2",
1 AS "C3"
FROM public.task_sequence AS "Extent1"
LEFT OUTER JOIN public.task_sequens_data AS "Extent2" ON "Extent1".id_task_sequens = "Extent2".id_task_sequens_data
LEFT OUTER JOIN public.task_sequens_data AS "Extent3" ON "Extent2".id_task_sequens_data = "Extent3".id_task_sequens_data
LEFT OUTER JOIN public.task_sequens_data AS "Extent4" ON "Extent2".id_task_sequens_data = "Extent4".id_task_sequens_data
LEFT OUTER JOIN public.time_table AS "Extent5" ON "Extent4".fk_time_table = "Extent5".id_time_table
LEFT OUTER JOIN public.task_sequens_data AS "Extent6" ON "Extent2".id_task_sequens_data = "Extent6".id_task_sequens_data ) AS "Project1"
OUTER APPLY (SELECT
"Extent7".id_time_table_constraint AS id_time_table_constraint,
"Extent7".fk_time_table AS fk_time_table,
"Extent7"."day" AS "day",
"Extent7".day_of_week AS day_of_week,
"Extent7"."month" AS "month",
"Extent7"."time" AS "time",
1 AS "C1"
FROM public.time_table_constraint AS "Extent7"
LEFT OUTER JOIN (SELECT
"Extent8".id_task_sequens_data AS id_task_sequens_data,
"Extent8".fk_time_table AS fk_time_table
FROM public.task_sequens_data AS "Extent8"
WHERE "Project1".id_task_sequens_data = "Extent8".id_task_sequens_data ) AS "Project2" ON true = true
WHERE "Project2".fk_time_table = "Extent7".fk_time_table ) AS "Project3"
ORDER BY "Project1".id_task_sequens ASC, "Project1".id_task_sequens_data ASC, "Project1".id_task_sequens_data1 ASC, "Project1".id_task_sequens_data2 ASC, "Project1".id_time_table ASC, "Project1".id_task_sequens_data3 ASC, "Project3"."C1" ASC[/b]
Database script:
Code: Select all
create table time_table
(
id_time_table bigserial primary key,
custom_period int not null default 0,
number_of_displayed_points int not null default 0,
priority int not null default 0,
start timestamp not null,
stop timestamp not null,
time_table_period int default 0
);
create table time_table_constraint
(
id_time_table_constraint bigserial primary key,
fk_time_table bigint not null references time_table on delete cascade,
day int not null default 0, -- check???
day_of_week int not null default 0,
month int not null default 0,
time timestamp not null
);
create table task_sequence
(
id_task_sequens bigserial primary key,
name text not null default ''
);
create table task_sequens_data
(
id_task_sequens_data bigint primary key references task_sequence on delete cascade,
current_operation int default 0,
fk_time_table bigint not null references time_table,
name text not null default ''
);
2008-10-31 16:15:29 EET ERROR: ошибка синтаксиса в или рядом "OUTER" на символе 2555
2008-10-31 16:15:29 EET КОМАНДА: SELECT
"Project1".id_task_sequens AS id_task_sequens,
"Project1".tmp AS tmp,
"Project1".id_task_sequens_data AS id_task_sequens_data,
"Project1".id_task_sequens_data1 AS id_task_sequens_data1,
"Project1".current_operation AS current_operation,
"Project1".fk_probe AS fk_probe,
"Project1"."name" AS "name",
"Project1".id_task_sequens_data2 AS id_task_sequens_data2,
"Project1".id_time_table AS id_time_table,
"Project1".custom_period AS custom_period,
"Project1".number_of_displayed_points AS number_of_displayed_points,
"Project1".priority AS priority,
"Project1"."start" AS "start",
"Project1".stop AS stop,
"Project1".time_table_period AS time_table_period,
"Project1".id_task_sequens_data3 AS id_task_sequens_data3,
"Project1"."C1" AS "C1",
"Project1"."C2" AS "C2",
"Project1"."C3" AS "C3",
"Project3"."C1" AS "C4",
"Project3".id_time_table_constraint AS id_time_table_constraint,
"Project3"."day" AS "day",
"Project3".day_of_week AS day_of_week,
"Project3"."month" AS "month",
"Project3"."time" AS "time",
"Project3".fk_time_table AS fk_time_table
FROM (SELECT
"Extent1".id_task_sequens AS id_task_sequens,
"Extent1".tmp AS tmp,
"Extent2".id_task_sequens_data AS id_task_sequens_data,
"Extent3".id_task_sequens_data AS id_task_sequens_data1,
"Extent3".current_operation AS current_operation,
"Extent3".fk_probe AS fk_probe,
"Extent3"."name" AS "name",
"Extent4".id_task_sequens_data AS id_task_sequens_data2,
"Extent5".id_time_table AS id_time_table,
"Extent5".custom_period AS custom_period,
"Extent5".number_of_displayed_points AS number_of_displayed_points,
"Extent5".priority AS priority,
"Extent5"."start" AS "start",
"Extent5".stop AS stop,
"Extent5".time_table_period AS time_table_period,
"Extent6".id_task_sequens_data AS id_task_sequens_data3,
1 AS "C1",
1 AS "C2",
1 AS "C3"
FROM public.task_sequence AS "Extent1"
LEFT OUTER JOIN public.task_sequens_data AS "Extent2" ON "Extent1".id_task_sequens = "Extent2".id_task_sequens_data
LEFT OUTER JOIN public.task_sequens_data AS "Extent3" ON "Extent2".id_task_sequens_data = "Extent3".id_task_sequens_data
LEFT OUTER JOIN public.task_sequens_data AS "Extent4" ON "Extent2".id_task_sequens_data = "Extent4".id_task_sequens_data
LEFT OUTER JOIN public.time_table AS "Extent5" ON "Extent4".fk_time_table = "Extent5".id_time_table
LEFT OUTER JOIN public.task_sequens_data AS "Extent6" ON "Extent2".id_task_sequens_data = "Extent6".id_task_sequens_data ) AS "Project1"
OUTER APPLY (SELECT
"Extent7".id_time_table_constraint AS id_time_table_constraint,
"Extent7".fk_time_table AS fk_time_table,
"Extent7"."day" AS "day",
"Extent7".day_of_week AS day_of_week,
"Extent7"."month" AS "month",
"Extent7"."time" AS "time",
1 AS "C1"
FROM public.time_table_constraint AS "Extent7"
LEFT OUTER JOIN (SELECT
"Extent8".id_task_sequens_data AS id_task_sequens_data,
"Extent8".fk_time_table AS fk_time_table
FROM public.task_sequens_data AS "Extent8"
WHERE "Project1".id_task_sequens_data = "Extent8".id_task_sequens_data ) AS "Project2" ON true = true
WHERE "Project2".fk_time_table = "Extent7".fk_time_table ) AS "Project3"
ORDER BY "Project1".id_task_sequens ASC, "Project1".id_task_sequens_data ASC, "Project1".id_task_sequens_data1 ASC, "Project1".id_task_sequens_data2 ASC, "Project1".id_time_table ASC, "Project1".id_task_sequens_data3 ASC, "Project3"."C1" ASC[/b]
- Tue 30 Sep 2008 06:44
- Forum: dotConnect for PostgreSQL
- Topic: EF & arrays & enums & composite types(EDM)
- Replies: 1
- Views: 2610
EF & arrays & enums & composite types(EDM)
hi!
I have table with big array (double precision[]) in my db. I want to work with it in my EDM. It realy big - and if I will parse it from text - it will work slowly . And if I store every value of array in child table - this method not fit for my needs too...
That the EDM not understand array types - it EDM or provider limitation?
Can I hope this feature will be supported? How many time to wait?
And same questions about pg-enums and composite types in edm.
I have table with big array (double precision[]) in my db. I want to work with it in my EDM. It realy big - and if I will parse it from text - it will work slowly . And if I store every value of array in child table - this method not fit for my needs too...
That the EDM not understand array types - it EDM or provider limitation?
Can I hope this feature will be supported? How many time to wait?
And same questions about pg-enums and composite types in edm.
- Fri 26 Sep 2008 07:08
- Forum: dotConnect for PostgreSQL
- Topic: EF: inserting into table with only serial pk column - bug
- Replies: 2
- Views: 2710
EF: inserting into table with only serial pk column - bug
I try to create entity. It contain only key and stores in database table, which contain only serial primary key column. SQL, which has been generated for inserting this entity: "INSERT INTO contact() VALUES();". It raises pgsql-error.
SQL, that provider must generate: "INSERT INTO contact(id_contact) VALUES(DEFAULT);".
SQL, that provider must generate: "INSERT INTO contact(id_contact) VALUES(DEFAULT);".
- Tue 23 Sep 2008 07:23
- Forum: dotConnect for PostgreSQL
- Topic: EF: An error occurred while executing the command definition
- Replies: 2
- Views: 12300
EF: An error occurred while executing the command definition
Hi!
My EDM contains abstract base class and it's childs classes. Classes mapped according to table-per-class scenario. I try to get list of base-class-entities from EDM. See exception text below:
----------------------------------------------------------------------------------
System.Data.EntityCommandExecutionException was unhandled
Message="An error occurred while executing the command definition. See the inner exception for details."
Source="System.Data.Entity"
StackTrace:
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
at MonitoringDbTest.Program.Main(String[] args) in C:\Documents and Settings\oleg\Мои документы\Visual Studio 2008\Projects\MonitoringDbTest\MonitoringDbTest\Program.cs:line 42
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: CoreLab.PostgreSql.PgSqlException
Message="UNION типы text и integer не совпадают"
Source="CoreLab.PostgreSql"
ErrorCode=-2147467259
CallStack=""
DetailMessage=""
FileName=".\src\backend\parser\parse_coerce.c"
Hint=""
LineNumber=1024
Position=0
ProcedureName="select_common_type"
StackTrace:
at CoreLab.PostgreSql.a.d(Boolean A_0)
at CoreLab.PostgreSql.a.ae()
at CoreLab.PostgreSql.a.b(String A_0)
at CoreLab.PostgreSql.a.l()
at CoreLab.PostgreSql.PgSqlCommand.a(Boolean A_0, Int32 A_1, Int32 A_2)
at CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at CoreLab.PostgreSql.Entity.f.a.a(CommandBehavior A_0)
at CoreLab.Common.Entity.f.a.b(CommandBehavior A_0)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
InnerException:
-------------------------------------------------------------------------------
Why it may happen?
My EDM contains abstract base class and it's childs classes. Classes mapped according to table-per-class scenario. I try to get list of base-class-entities from EDM. See exception text below:
----------------------------------------------------------------------------------
System.Data.EntityCommandExecutionException was unhandled
Message="An error occurred while executing the command definition. See the inner exception for details."
Source="System.Data.Entity"
StackTrace:
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
at MonitoringDbTest.Program.Main(String[] args) in C:\Documents and Settings\oleg\Мои документы\Visual Studio 2008\Projects\MonitoringDbTest\MonitoringDbTest\Program.cs:line 42
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: CoreLab.PostgreSql.PgSqlException
Message="UNION типы text и integer не совпадают"
Source="CoreLab.PostgreSql"
ErrorCode=-2147467259
CallStack=""
DetailMessage=""
FileName=".\src\backend\parser\parse_coerce.c"
Hint=""
LineNumber=1024
Position=0
ProcedureName="select_common_type"
StackTrace:
at CoreLab.PostgreSql.a.d(Boolean A_0)
at CoreLab.PostgreSql.a.ae()
at CoreLab.PostgreSql.a.b(String A_0)
at CoreLab.PostgreSql.a.l()
at CoreLab.PostgreSql.PgSqlCommand.a(Boolean A_0, Int32 A_1, Int32 A_2)
at CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at CoreLab.PostgreSql.Entity.f.a.a(CommandBehavior A_0)
at CoreLab.Common.Entity.f.a.b(CommandBehavior A_0)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
InnerException:
-------------------------------------------------------------------------------
Why it may happen?
- Fri 19 Sep 2008 07:39
- Forum: dotConnect for PostgreSQL
- Topic: Entity Framework & pgsql fuctions (stored procedures)
- Replies: 5
- Views: 4953
I made it work. It works only with function, which return record (I use table type). Generator doesn't correct - it generates returning record parameter (mode IN ). And to make it work I must delete row with this parameter from edmx xml manualy. When updating edm, designer recreates this garbage - and I must delete it again and again . Does more efficient way exist to return serial id from db function?
- Thu 18 Sep 2008 07:07
- Forum: dotConnect for PostgreSQL
- Topic: Entity Framework & pgsql fuctions (stored procedures)
- Replies: 5
- Views: 4953
Entity Framework & pgsql fuctions (stored procedures)
hi!
I try to use database functions for insert/update/delete entity. Insert function with result binding doesn't work (I use it to get database generated serial id). I try it with several types of functions (with some variation return types) - and I can't make it work . It seems like pgsqldirect.net provider problem - because everything works well with MS SQL Server.
Details:
I add result binding in EDM-designer, and I have compilation error message below:
-----------------------------------------------------------------------------------
Error 1 Error 2046: A mapping function binding specifies a function sp_testModel.Store.test_ins that is not supported. Only functions that cannot be composed are supported.
-----------------------------------------------------------------------------------
if I manualy edit xml edmx file: "IsComposable="false"" then I see next compilation error message:
-----------------------------------------------------------------------------------
Error 1 Error 137: Functions that cannot be composed must not declare a return type.
-----------------------------------------------------------------------------------
How can I get serial id from insert function?
I try to use database functions for insert/update/delete entity. Insert function with result binding doesn't work (I use it to get database generated serial id). I try it with several types of functions (with some variation return types) - and I can't make it work . It seems like pgsqldirect.net provider problem - because everything works well with MS SQL Server.
Details:
I add result binding in EDM-designer, and I have compilation error message below:
-----------------------------------------------------------------------------------
Error 1 Error 2046: A mapping function binding specifies a function sp_testModel.Store.test_ins that is not supported. Only functions that cannot be composed are supported.
-----------------------------------------------------------------------------------
if I manualy edit xml edmx file: "IsComposable="false"" then I see next compilation error message:
-----------------------------------------------------------------------------------
Error 1 Error 137: Functions that cannot be composed must not declare a return type.
-----------------------------------------------------------------------------------
How can I get serial id from insert function?