You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like take is missing in masoniteorm or at least doesn't work the same way. Take is equivalent to limit in Orator. I wasn't sure if this was an intentional omission, oversight, or change in masoniteorm. Take is somewhat nicer to read in some contexts, so it would be nice to have.
When I try what I think is equivalent in masoniteorm:
I get the error: AttributeError: 'QueryBuilder' object has no attribute 'take'. Using limit instead of take works and generates the expected SQL with OFFSET 10 and LIMIT 5.
If take was intentionally removed, this is something that should be documented in the Orator to Masonite ORM migration documentation.
The text was updated successfully, but these errors were encountered:
tpow
added
the
bug
An existing feature is not working as intended
label
Mar 8, 2021
In Orator ORM you can use code like this:
logins = user.logins().skip(10).take(5).get()
It looks like take is missing in masoniteorm or at least doesn't work the same way. Take is equivalent to limit in Orator. I wasn't sure if this was an intentional omission, oversight, or change in masoniteorm. Take is somewhat nicer to read in some contexts, so it would be nice to have.
When I try what I think is equivalent in masoniteorm:
logins = user.related("logins").skip(10).take(5).get()
I get the error: AttributeError: 'QueryBuilder' object has no attribute 'take'. Using limit instead of take works and generates the expected SQL with OFFSET 10 and LIMIT 5.
If take was intentionally removed, this is something that should be documented in the Orator to Masonite ORM migration documentation.
The text was updated successfully, but these errors were encountered: