#Panache Entities! Hibernate :)
29 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @outer tiger! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Welp, not creating an account there.
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?
wdym
Looks like you're trying to expose your repository as a Rest API directly, instead of using some sort of Controller/Service layer
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?
dangers of doing what?
Exposing your Database without any authorization layer.
I guess I should explain what this project is for, the course I'm taking requires us to make an Angular SPA. We don't have to implement any backend, but it may be more interesting if we do
I've decided I may as well make a simple API, to demonstrate my SPA with something more interesting
this is not something I do for my job, for any client, or is expected to be ran by anyone else
many frameworks make it simple to write a basic API, but i figured I'd use quarkus simply because I know it has this niche functionality and I'm acquainted with it
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
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.
makes sense
well, thank you for your time, I guess I can close this now
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.