-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Panache support for not initialized proxies #9602
Comments
I agree, this would be very useful. Thanks for opening! @FroMage : I suppose this is doable? |
You can use |
I guess only passing ids from a webapi is not that unusual and:
looks leaner vs.
|
Sure, I don't question that. But we don't want to add every Hibernate feature in a Panache layer because that would make the API huge and scary. So we always try to resist additions to the most common use-cases that people need. Hence my question to @Sanne but perhaps @emmanuelbernard has an idea too. |
You can't easily update collections without this .. so yes I'd say it's commonly useful. As many other things :) |
Although TBH |
If I give you |
Hum, |
I tend to agree with @emmanuelbernard, then people will want @suchwerk what do you do with those references you get ? Maybe we're missing a different functionality here ? |
@loicmathieu I just want to add them to a jointable. |
I'm using myEntity.setRelated(getReference(Related.clas, id)) quite often to set the related entity and there's no reason fetch it. From sql point of view just want to set foreign key id which I know |
I agree but it looks like the mentioned usage is a bit misleading? All that's described is adding |
Just discussed this issue with @yrodiere and will work on a PR on Panache in a near future! |
Description
The use-case is to add not-initilized proxies to a set inside a panache entity. Right now i have to inject the entity manager to access getReference. It would be nice if PanacheEntityBase itself would implement getReference.
So
to be replaced by something like:
The text was updated successfully, but these errors were encountered: