This commit is contained in:
@@ -241,9 +241,9 @@ public class BindVisitor implements ExpressionVisitor
|
|||||||
DepotMarshaller marsh = _types.getMarshaller(insertClause.getPersistentClass());
|
DepotMarshaller marsh = _types.getMarshaller(insertClause.getPersistentClass());
|
||||||
|
|
||||||
Object pojo = insertClause.getPojo();
|
Object pojo = insertClause.getPojo();
|
||||||
Set<String> generatedFields = insertClause.getIdentityFields();
|
Set<String> idFields = insertClause.getIdentityFields();
|
||||||
for (String field : marsh.getColumnFieldNames()) {
|
for (String field : marsh.getColumnFieldNames()) {
|
||||||
if (!generatedFields.contains(field)) {
|
if (!idFields.contains(field)) {
|
||||||
marsh.getFieldMarshaller(field).readFromObject(pojo, _stmt, _argIdx ++);
|
marsh.getFieldMarshaller(field).readFromObject(pojo, _stmt, _argIdx ++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -451,12 +451,12 @@ public abstract class BuildVisitor implements ExpressionVisitor
|
|||||||
}
|
}
|
||||||
_builder.append(") values(");
|
_builder.append(") values(");
|
||||||
|
|
||||||
Set<String> generatedFields = insertClause.getIdentityFields();
|
Set<String> idFields = insertClause.getIdentityFields();
|
||||||
for (int ii = 0; ii < fields.length; ii++) {
|
for (int ii = 0; ii < fields.length; ii++) {
|
||||||
if (ii > 0) {
|
if (ii > 0) {
|
||||||
_builder.append(", ");
|
_builder.append(", ");
|
||||||
}
|
}
|
||||||
if (generatedFields.contains(fields[ii])) {
|
if (idFields.contains(fields[ii])) {
|
||||||
_builder.append("DEFAULT");
|
_builder.append("DEFAULT");
|
||||||
} else {
|
} else {
|
||||||
_builder.append("?");
|
_builder.append("?");
|
||||||
|
|||||||
@@ -257,8 +257,8 @@ public class DepotMarshaller<T extends PersistentRecord>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ValueGenerator} used to generate primary keys for this persistent object,
|
* Returns the {@link ValueGenerator} objects used to automatically generate field values for
|
||||||
* or null if it does not use a key generator.
|
* us when a new record is inserted.
|
||||||
*/
|
*/
|
||||||
public Iterable<ValueGenerator> getValueGenerators ()
|
public Iterable<ValueGenerator> getValueGenerators ()
|
||||||
{
|
{
|
||||||
@@ -989,5 +989,4 @@ public class DepotMarshaller<T extends PersistentRecord>
|
|||||||
|
|
||||||
/** The name of the table we use to track schema versions. */
|
/** The name of the table we use to track schema versions. */
|
||||||
protected static final String SCHEMA_VERSION_TABLE = "DepotSchemaVersion";
|
protected static final String SCHEMA_VERSION_TABLE = "DepotSchemaVersion";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user