Search found 1 match

by Tom Wilkinson
Mon 05 Oct 2009 13:43
Forum: Entity Framework support
Topic: ORA-01790
Replies: 40
Views: 18453

I am also having this problem

I have the same problem using version 5.25.44.

I did find a workaroud but I would perfer it to work the old way.

Code: Select all

public REQUEST GetRequest(int id)
        {
            var q = from r in Ctx.REQUEST
                        .Include("HISTORY")
                        .Include("REQUEST_WORKGROUP.WORKGROUP")
                        //.Include("ASSIGNMENTS.STAFF")  // Devart bug ORA-01790: expression must have same datatype as corresponding expression
                        //.Include("ASSIGNMENTS.TASKS")  // Devart bug ORA-01790: expression must have same datatype as corresponding expression
                        //.Include("COMMENTS")           // Devart bug ORA-01790: expression must have same datatype as corresponding expression
                        .Include("PROJECT")
                        .Include("WORKGROUP")
                    where r.ID == id
                    select r;

            // workaroud for Devart bug ORA-01790: expression must have same datatype as corresponding expression 
            // this will show the bad sql in x; 
            var x = ((ObjectQuery)q).ToTraceString();
            var req = q.First();
            req.COMMENTS.Load();
            req.ASSIGNMENTS.Load();
            foreach (var assignment in req.ASSIGNMENTS)
            {
                assignment.STAFFReference.Load();
                assignment.TASKS.Load();
            }
            // end of workaround

            return req;
        }