Skip to content

Oracle: outer join retrieves no result #349

Open
@object

Description

@object

When using query with outer join syntax (operator !!) no results are retrieved in case the joined table has no matching rows, so outer join works as inner join.

Example:

query { for p in dbContext.Granitt.Programmes do
        join d in (!!) dbContext.Granitt.ProgrammesDistributions on (p.ProgrammeId = d.ProgrammeId)
        where (p.PiProgId = "KOID35004614") 
        select p.PiProgId }

dbContext.Granitt.Programmes has a record with PiProgId "KOID35004614", so if remove a join on dbContext.Granitt.ProgrammesDistributions, I get back correct result. But if I join two tables on ProgrammeId (primary key on Programmes and foreign key on ProgrammesDistributions), then I get no results.

The database is Oracle.

Here's a generated query:

Executing SQL: SELECT p.PI_PROG_ID as "p.PI_PROG_ID",p.PROGRAMME_ID as "p.PROGRAMME_ID",d.PROGRAMME_DISTRIBUTION_ID as "d.PROGRAMME_DISTRIBUTION_ID" FROM GRANITT.PROGRAMMES p INNER JOIN GRANITT.PROGRAMMES_DISTRIBUTIONS d on p.PROGRAMME_ID = d.PROGRAMME_ID WHERE ((p.PI_PROG_ID = :param1)) - params :param1 - "KOID35004614";

As you can see, it's an INNER JOIN in the SQL statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions