This commit is contained in:
@@ -241,9 +241,9 @@ public class BindVisitor implements ExpressionVisitor
|
||||
DepotMarshaller marsh = _types.getMarshaller(insertClause.getPersistentClass());
|
||||
|
||||
Object pojo = insertClause.getPojo();
|
||||
Set<String> generatedFields = insertClause.getIdentityFields();
|
||||
Set<String> idFields = insertClause.getIdentityFields();
|
||||
for (String field : marsh.getColumnFieldNames()) {
|
||||
if (!generatedFields.contains(field)) {
|
||||
if (!idFields.contains(field)) {
|
||||
marsh.getFieldMarshaller(field).readFromObject(pojo, _stmt, _argIdx ++);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,12 +451,12 @@ public abstract class BuildVisitor implements ExpressionVisitor
|
||||
}
|
||||
_builder.append(") values(");
|
||||
|
||||
Set<String> generatedFields = insertClause.getIdentityFields();
|
||||
Set<String> idFields = insertClause.getIdentityFields();
|
||||
for (int ii = 0; ii < fields.length; ii++) {
|
||||
if (ii > 0) {
|
||||
_builder.append(", ");
|
||||
}
|
||||
if (generatedFields.contains(fields[ii])) {
|
||||
if (idFields.contains(fields[ii])) {
|
||||
_builder.append("DEFAULT");
|
||||
} else {
|
||||
_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,
|
||||
* or null if it does not use a key generator.
|
||||
* Returns the {@link ValueGenerator} objects used to automatically generate field values for
|
||||
* us when a new record is inserted.
|
||||
*/
|
||||
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. */
|
||||
protected static final String SCHEMA_VERSION_TABLE = "DepotSchemaVersion";
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user