19 Replies
⌛
This post has been reserved for your question.
Hey @I write code for € or $! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Welp, not creating an account there.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Very cringe, but I think we can still dissect it
Is there a reason you're trying to expose your repository directly as a rest API?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Looks like you're trying to expose your repository as a Rest API directly, instead of using some sort of Controller/Service layer
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Before I help you fix this, you do understand the dangers of doing that, and the safe guards you need for it to work without blowing up in your face right?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Exposing your Database without any authorization layer.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Fair, just remember proper access control. This could be done at a gateway level, which is what I'd expect.
To solve this problem you need to create a Projection https://quarkus.io/guides/hibernate-orm-panache#query-projection
Simplified Hibernate ORM with Panache
Quarkus: Supersonic Subatomic Java
The projection will allow you to create a separate view of your stuff, so you can still create entities using the base stuff, and then avoid infinite recursion with projections.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I normally call them something like
FlatX
or ProjectionX
.
But whatever works, worksUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@315595292756017154>.