QueryToModelMapper questions #598
Unanswered
guilhermeaiolfi
asked this question in
Q&A
Replies: 1 comment
-
Oh those are great questions, and the answer is pretty simple: there are no real guarantees right now 😅 That's why I have that
This happens when loading nested relations. A big difference with eg. Laravel's Eloquent is that our DBAL will load all relations within a single query using JOINs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking at https://github.com/tempestphp/tempest-database/blob/main/src/Mappers/QueryToModelMapper.php
and wondering how exactly you can be sure that the query will have the column name as you expected? And how exactly is that format?
I don't think it can handle arbitrary SELECTs with custom fields or aliases in it, right?
Since I am here asking questions, when a column name will have more than 3 parts? as tested here:
https://github.com/tempestphp/tempest-database/blob/8eb13a2460ad934fb05bd2e925870bfbc8b6fd36/src/Mappers/QueryToModelMapper.php#L55
Beta Was this translation helpful? Give feedback.
All reactions