I don’t know how to extract a test case out of this. If you can provide some tips about it I will post one. Here is the minimal model to reproduce the issue
@Entity(name = "abstracttaskentity")
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class AbstractTaskEntity {
@Id
@Type(type = "uuid-char")
@Column(name = "id")
private UUID taskId;
@NotNull
private String name;
private String description;
private boolean locked;
public UUID getTaskId() {
return taskId;
}
public void setTaskId(UUID taskId) {
this.taskId = taskId;
}
public boolean isLocked() {
return locked;
}
/**
* @param locked
*/
public void setLocked(boolean locked) {
this.locked = locked;
}
public String getName() {
return name;
}
/**
* @param name
*/
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
/**
* @param description
*/
public void setDescription(String description) {
this.description = description;
}
}
Then one implementing class
@Entity(name = "webtaskentity")
public class WebTaskEntity extends AbstractTaskEntity {
private String sessionId;
public String getSessionId() {
return sessionId;
}
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
}
To have more information : the entity is persisted through the entity manager by a web handler. Then a background-running thread find out the task and tries to lock it with the query I gave in the issue. |