[hibernate-issues] [JIRA] (HHH-14153) HQL update query with multiple condition generates temporary tables on SQLServer

François DAMBRINE (JIRA) jira at hibernate.atlassian.net
Thu Aug 13 06:59:37 EDT 2020


François DAMBRINE ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5c07a505d3af3b1ccfec791d ) *commented* on HHH-14153 ( https://hibernate.atlassian.net/browse/HHH-14153?atlOrigin=eyJpIjoiNDUzZjQ1OGY4MmIzNGY4N2JiNTMzY2E1ZDQzZDQ3MjIiLCJwIjoiaiJ9 )

Re: HQL update query with multiple condition generates temporary tables on SQLServer ( https://hibernate.atlassian.net/browse/HHH-14153?atlOrigin=eyJpIjoiNDUzZjQ1OGY4MmIzNGY4N2JiNTMzY2E1ZDQzZDQ3MjIiLCJwIjoiaiJ9 )

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.

( https://hibernate.atlassian.net/browse/HHH-14153#add-comment?atlOrigin=eyJpIjoiNDUzZjQ1OGY4MmIzNGY4N2JiNTMzY2E1ZDQzZDQ3MjIiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14153#add-comment?atlOrigin=eyJpIjoiNDUzZjQ1OGY4MmIzNGY4N2JiNTMzY2E1ZDQzZDQ3MjIiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100144- sha1:b6d623e )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200813/02310ce9/attachment.html 


More information about the hibernate-issues mailing list