Stéphane Épardaud
Stéphane Épardaud
> I think we need to have both, this pull request was created because a user is migrating their Spring apps to Quarkus and Spring uses Map. I don't know...
Is it really that common to check for existence of a record without loading it? I've never had to do that myself.
Well, sure, but only if you need to check for existence without later using the entity. I've never seen such a use case. All my use-cases check if the object...
> and then throw an NotFoundException But if it exists, what does it do?
Sure, but the question remains: what do you do once you know the entity exists?
My argument was that in most cases, once we know the entity exists, we typically load it. For example, if you want to avoid creating a duplicate, you check that...
@gavinking is there an equivalent `.exists(Object id)` method in the latest ORM these days? I could not find anything in the `Session` API.
Yeah, agreed. I was sceptical because I assumed `exists` would always be followed by a `load`. @gavinking assumes it's for `upsert`. But @markus-lehr-dedalus was the first to raise a use-case...
Hah. First time I hear about this, but it seems useful, and even though it's in draft, the very long list of implementors that have a non-standard equivalent solution to...