HHH-13192 Revert HHH-13140

Keep the test and add a @FailureExpected annotation
This commit is contained in:
Guillaume Smet 2019-01-16 13:28:56 +01:00
parent 502fd78c45
commit a57d7e7767
2 changed files with 4 additions and 13 deletions

View File

@ -239,22 +239,12 @@ public abstract class AbstractPathImpl<X>
@Override
public String render(RenderingContext renderingContext) {
PathSource<?> source = getPathSource();
String path;
if ( source != null ) {
source.prepareAlias( renderingContext );
path = source.getPathIdentifier() + "." + getAttribute().getName();
return source.getPathIdentifier() + "." + getAttribute().getName();
}
else {
path = getAttribute().getName();
return getAttribute().getName();
}
String alias = getAlias();
if ( alias != null ) {
path = path + " as " + alias;
}
return path;
}
}

View File

@ -18,7 +18,7 @@ import javax.persistence.criteria.Root;
import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase;
import org.hibernate.query.Query;
import org.hibernate.transform.Transformers;
import org.hibernate.testing.FailureExpected;
import org.hibernate.testing.jdbc.SQLStatementInterceptor;
import org.junit.Before;
import org.junit.Test;
@ -50,6 +50,7 @@ public class CriteriaMultiselectAliasTest extends BaseEntityManagerFunctionalTes
}
@Test
@FailureExpected(jiraKey = "HHH-13140")
public void test() {
doInJPA( this::entityManagerFactory, entityManager -> {
final CriteriaBuilder cb = entityManager.getCriteriaBuilder();