carlor wrote:
Sorry. I guess I could have been more clear.
The generated code is as above. The code I need is
WHERE "AMSOBJ"."PM_PER_DIEM_DAY"."PM_PER_DIEM_DAY_ID"=
"AMSOBJ"."PM_PER_DIEM_HEARING"."PM_PER_DIEM_DAY_ID"
(+)AND ( "PM_PER_DIEM_DAY"."PANEL_MEMBER_CLAIM_ID" = :PANEL_MEMBER_CLAIM_ID1)
Notice that the "(+)" is now beside the AND. When I execute this code in Toad, I get what I need. All the entries in PM_PER_DIEM_DAY with the claimID even if there isn't a corresponding entry in PM_PER_DIEM_HEARING.
As to your second question, LLBLGen shows:
Selected used relation
PM_PER_DIEM_HEARING - PM_PER_DIEM_DAY (m:1)
I hope this makes it clearer. I must appologize, though, as I'm not a database guy.
A LEFT JOIN B, will result in FROM A, B WHERE A.foo = B.foo(+)
So your assumption is correct and the generated code is wrong. I'd like to know which runtime library version you're using. The routine generating the SQL has been reworked in september 2004, and later versions might fix your problem (as there was an issue with weakrelations and right/left joins. You effectively need a right join, which older code couldn't do)
You can retrieve the version of the runtime lib as:
string version = RuntimeLibraryVersion.Version;
string build = RuntimeLibraryVersion.Build;
Version should be 1.0.2004.1 and build something later than 09242004
As a workaround, you can re-add the entities to the typed list, but in a different order: first PM_PER_DIEM_DAY and then PM_PER_DIEM_HEARING. This will give you an 1:n relation being used which should work ok. (but of course the code should also handle your setup)