Skip to main content
7 events
when toggle format what by license comment
Nov 8, 2016 at 15:09 vote accept OddDev
Nov 8, 2016 at 15:03 comment added OddDev @MarcoBorchert and Vlad I guess you've a point. Sorry... :) Let me think this trough once again.
Nov 8, 2016 at 15:02 comment added OddDev @MarcoBorchert Yes, of course I understand this. However, you don't know that you have to search for in the Archery table. You need logic to determine this. Like "IF type == 'Archer' THEN is ARCHER-table ELSE IF (...)". And that's a smell imho. Or isn't it?
Nov 8, 2016 at 15:00 comment added Vlad OddDev, you are not supposed to do such a thing. Your ORM in application layer should know in what table to search for attributes of the human with Type == 'Archer'. Or, for example, you can create Archers view on top of Human and Archer tables and search in it, not in Human table.
Nov 8, 2016 at 14:54 comment added Marco Borchert @OddDev This is the idiomatic way. And your query would be: SELECT "Arrows" FROM "HUMAN" LEFT JOIN "ARCHER" ON "HUMAN"."ID" = "ARCHER"."HUMAN_ID" WHERE "HUMAN"."Forename" = 'John' AND "HUMAN"."Surname" = 'Doe'
Nov 8, 2016 at 14:50 history edited Vlad CC BY-SA 3.0
Typo
Nov 8, 2016 at 14:43 history answered Vlad CC BY-SA 3.0