diff --git a/querydsl-apt/src/test/java/com/mysema/query/domain/PropertyTypeTest.java b/querydsl-apt/src/test/java/com/mysema/query/domain/PropertyTypeTest.java new file mode 100644 index 000000000..b46dd8f79 --- /dev/null +++ b/querydsl-apt/src/test/java/com/mysema/query/domain/PropertyTypeTest.java @@ -0,0 +1,25 @@ +package com.mysema.query.domain; + +import org.junit.Ignore; +import org.junit.Test; + +import com.mysema.query.annotations.PropertyType; +import com.mysema.query.annotations.QueryEntity; +import com.mysema.query.annotations.QueryType; + +@Ignore +public class PropertyTypeTest { + + @QueryEntity + public class Entity { + + @QueryType(PropertyType.STRING) + Integer numberAsString; + + } + + @Test + public void NumberAsString_Like(){ + QPropertyTypeTest_Entity.entity.numberAsString.like("a"); + } +} diff --git a/querydsl-core/src/main/java/com/mysema/query/annotations/PropertyType.java b/querydsl-core/src/main/java/com/mysema/query/annotations/PropertyType.java index 714edb1a8..8db42ca5e 100644 --- a/querydsl-core/src/main/java/com/mysema/query/annotations/PropertyType.java +++ b/querydsl-core/src/main/java/com/mysema/query/annotations/PropertyType.java @@ -18,32 +18,49 @@ import com.mysema.codegen.model.TypeCategory; public enum PropertyType { /** * - */ - COMPARABLE(TypeCategory.COMPARABLE), + */ + COMPARABLE(TypeCategory.COMPARABLE), + /** * - */ + */ ENUM(TypeCategory.ENUM), + /** * - */ + */ DATE(TypeCategory.DATE), + /** * - */ + */ DATETIME(TypeCategory.DATETIME), + /** * - */ + */ NONE(null), + /** * */ + NUMERIC(TypeCategory.NUMERIC), + + /** + * + */ SIMPLE(TypeCategory.SIMPLE), + + /** + * + */ + STRING(TypeCategory.STRING), + /** * */ TIME(TypeCategory.TIME), + /** * */