-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Decodable objects after LEFT OUTER JOIN #936
Comments
I'm facing kind of the opposite issue. I want the
Error:
Aside from the garbled mess of escape quotes, I must have some kind of fundamental misunderstand of how this decoding happens and what values should appear in my |
You may want to check https://github.com/groue/GRDB.swift and its associations: https://github.com/groue/GRDB.swift/blob/master/Documentation/AssociationsBasics.md They make decoding joined tables a breeze |
Please ask on StackOverflow for this kind of questions (we are tracking bugs on GitHub) |
@nathanfallet I think this is potential shortcoming of the library, not a usage clarification. Row allows us to access namespaced columns by unprefixed name, provided there is no ambiguity. However, the This is also described in #225 |
I am wondering if there is a way to init my decodable object after I do left outer join two (or more) Tables. The problem I am facing is that when I join two tables, the column names automatically get prefixed with Table's name. Thus, when I do
Customer(from: row.decoder())
this fails as myCodingKeys
do not include my Table's name upfront. Is there any way to achieve this without renaming them (CodingKeys)?The text was updated successfully, but these errors were encountered: