mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
updated version to 1.9.1
This commit is contained in:
parent
35226bf8da
commit
ea53593dc6
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
<name>Querydsl</name>
|
||||
<description>parent project for querydsl modules</description>
|
||||
<url>http://source.mysema.com/display/querydsl</url>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.9.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -206,10 +206,10 @@ public class MetaDataSerializer extends EntitySerializer {
|
||||
|
||||
protected void serializePrimaryKeys(EntityType model, CodeWriter writer,
|
||||
Collection<PrimaryKeyData> primaryKeys) throws IOException {
|
||||
Type queryType = typeMappings.getPathType(model, model, true);
|
||||
// Type queryType = typeMappings.getPathType(model, model, true);
|
||||
for (PrimaryKeyData primaryKey : primaryKeys){
|
||||
String fieldName = namingStrategy.getPropertyNameForPrimaryKey(primaryKey.getName(), model);
|
||||
StringBuilder value = new StringBuilder("new PrimaryKey<"+queryType.getSimpleName()+">(this, ");
|
||||
StringBuilder value = new StringBuilder("new PrimaryKey<"+model.getSimpleName()+">(this, ");
|
||||
boolean first = true;
|
||||
for (String column : primaryKey.getColumns()){
|
||||
if (!first){
|
||||
@ -219,7 +219,7 @@ public class MetaDataSerializer extends EntitySerializer {
|
||||
first = false;
|
||||
}
|
||||
value.append(")");
|
||||
Type type = new ClassType(PrimaryKey.class, queryType);
|
||||
Type type = new ClassType(PrimaryKey.class, model);
|
||||
writer.publicFinal(type, fieldName, value.toString());
|
||||
}
|
||||
|
||||
|
||||
@ -65,6 +65,19 @@ public class MetaDataExporterTest extends AbstractJDBCTest{
|
||||
|
||||
statement.execute("drop table date_time_test if exists");
|
||||
statement.execute("create table date_time_test (dt datetime)");
|
||||
|
||||
statement.execute("create table employee("
|
||||
+ "id INT, "
|
||||
+ "firstname VARCHAR(50), "
|
||||
+ "lastname VARCHAR(50), "
|
||||
+ "salary DECIMAL(10, 2), "
|
||||
+ "datefield DATE, "
|
||||
+ "timefield TIME, "
|
||||
+ "superior_id int, "
|
||||
+ "survey_id int, "
|
||||
+ "survey_name varchar(30), "
|
||||
+ "CONSTRAINT PK_employee PRIMARY KEY (id), "
|
||||
+ "CONSTRAINT FK_superior FOREIGN KEY (superior_id) REFERENCES employee(id))");
|
||||
|
||||
MetaDataSerializer serializer = new MetaDataSerializer(namePrefix, namingStrategy);
|
||||
MetaDataExporter exporter;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user