Query always inserts unexpected where clause

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
pokaragat
Posts: 23
Joined: Mon 15 Sep 2008 21:09

Query always inserts unexpected where clause

Post by pokaragat » Thu 04 Dec 2008 19:04

The oracle query statement always adds a where clause that is not part of the linq query.

It always inserts ("Extent1".THROUGH_DATE IS NOT NULL).
There is nothing special in the edmx for this table. Other table seem fine.
ex:

1.) DONATION.Where(c => c.THROUGH_DATE == null)

dbmon:
Execute: SELECT
1 AS C1,
............ deleted to be brief
FROM VCL.DONATION "Extent1"
WHERE ("Extent1".THROUGH_DATE IS NOT NULL) AND ("Extent1".THROUGH_DATE IS NULL)

2.) DONATION.Where(c => c.DELETE_USERNAME == null)

dbmon:
Execute: SELECT
1 AS C1,
............ deleted to be brief
FROM VCL.DONATION "Extent1"
WHERE ("Extent1".THROUGH_DATE IS NOT NULL) AND ("Extent1".DELETE_USERNAME IS NULL)

3.) DONATION.Where(c => c.BUCKET_NUMBER == null)

dbmon:
Execute: SELECT
1 AS C1,
............ deleted to be brief
FROM VCL.DONATION "Extent1"
WHERE ("Extent1".THROUGH_DATE IS NOT NULL) AND ("Extent1".BUCKET_NUMBER IS NULL)

pokaragat
Posts: 23
Joined: Mon 15 Sep 2008 21:09

Post by pokaragat » Thu 04 Dec 2008 19:32

Somebody put a condition on the Mapping.

Ignore this post. Thanks anyway.

Post Reply