I'm testing the way @Where annotation works, and I found the following
If we have an entity annotated like this:
@Where(clause = "deleted = false")
@SQLDelete(sql = "UPDATE tag set deleted = true where id = ?")
If the entity was previously deleted and I try to load it in a new
The entity is fetched successfully, and the assert fails.
The only way to make it work is if I override the load query using the
@Loader(namedQuery = "findTagById")
@NamedQuery(name = "findTagById", query = "select t from Tag t where
t.id = ? and t.deleted = false")
Is this the expected behavior or is it a bug?
Show replies by date