我正在从 dbcontext 执行标准 GetAll():
DbContext.Set<T>()
但是我从 oracle 收到一条奇怪的消息:
{"ORA-00904: \"Extent1\".\"Sub_Object_ID\": 无效标识符"}
如果我查看生成的 sql(通过查看查询变量),我看到最后添加了一些变量作为 CASTS
"Extent1"."SomeEntity_ID", <-- correct
"Extent1"."SomeEnttiy2_ID", <-- correct
"Extent1"."Sub_Object", <-- correct
CAST( "Extent1"."SomeEntity_ID1" AS number(10,0)) AS "C3", <-- "1" appended
CAST( "Extent1"."SomeEnttiy2_ID1" AS number(10,0)) AS "C4", <-- "1" appended
CAST( "Extent1"."Sub_Object_ID" AS number(10,0)) AS "C5", <-- "_ID" appended
...
FROM "dbo"."MyEntity" "Extent1"
在选择的主要部分中正确识别了所有属性。但是在 CAST 部分,属性名称附加了数字和_ID ..这导致选择失败..
看着我的实体,我有一次指定的属性..以这种格式:
public Nullable<decimal> SomeEntity_ID { get; set; }
演员表怎么了?