Search in sources :

Example 11 with Property

use of com.querydsl.codegen.Property in project querydsl by querydsl.

the class DefaultNamingStrategyTest method getPropertyNameForPrimaryKey_clash.

@Test
public void getPropertyNameForPrimaryKey_clash() {
    entityModel.addProperty(new Property(entityModel, "id", Types.STRING));
    assertEquals("idPk", namingStrategy.getPropertyNameForPrimaryKey("id", entityModel));
}
Also used : Property(com.querydsl.codegen.Property) Test(org.junit.Test)

Aggregations

Property (com.querydsl.codegen.Property)11 EntityType (com.querydsl.codegen.EntityType)6 Type (com.querydsl.codegen.utils.model.Type)3 PrimaryKeyData (com.querydsl.sql.codegen.support.PrimaryKeyData)3 AnnotatedElement (java.lang.reflect.AnnotatedElement)3 HashMap (java.util.HashMap)3 SimpleType (com.mysema.codegen.model.SimpleType)2 Type (com.mysema.codegen.model.Type)2 ClassType (com.querydsl.codegen.utils.model.ClassType)2 SimpleType (com.querydsl.codegen.utils.model.SimpleType)2 TypeCategory (com.querydsl.codegen.utils.model.TypeCategory)2 ColumnImpl (com.querydsl.sql.ColumnImpl)2 ColumnMetadata (com.querydsl.sql.ColumnMetadata)2 Collection (java.util.Collection)2 MappingException (org.hibernate.MappingException)2 org.hibernate.mapping (org.hibernate.mapping)2 Test (org.junit.Test)2 JavaWriter (com.querydsl.codegen.utils.JavaWriter)1 SimpleCompiler (com.querydsl.codegen.utils.SimpleCompiler)1 PropertyType (com.querydsl.core.annotations.PropertyType)1