-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
How to do customize query in loopback 4? #3798
Comments
Transferring to |
so ? This is not supported in lb4 ? |
@1057437122, the GitHub issue was originally created in Regarding your question, there's some relevant code snippet mentioned in: #3459 (comment). Could you please give it a try? |
OK, thanks for the reply , I'll try |
@1057437122, inspired by the example from #3459 (comment). I've added one more endpoint / function in the controller so that it's easier to test.
Please note that the command you put as the parameter are specific to the database you're calling. I'm using Postgresql, but the above example is simple enough that is probably working for other relational database. Hope it helps! With that, I'd like close this issue for this question. If you encounter other issues, feel free to open a new issue. Thanks! |
Hello , what i want to do is to query like this ' select a.id,b.name,c.size from a left join b on a.id=b.aid left join c on b.id=c.bid where a.id=xxxx';
if I use PHP laravel i can do with model like this 'A::query()->select('a.id','b.name','c.size')->leftJoin('b','a.id','=','b.aid')->leftJoin(c,'c.bid','=','b.id')->where('a.id','xxx')->get()
I didn't find any documents about this type query in loopback.
The text was updated successfully, but these errors were encountered: