if (table.getColumnByName("_id") == null) {
// all mongo db collections have an _id field as the first field.
ImmutableColumn idColumn = new ImmutableColumn("_id",
ColumnType.ROWID, table, table.getColumnCount(), null,
null, null, null, true, null, true);
table.addColumn(idColumn);
}
table.setSchema(schema);
getUpdateCallback().createCollection(table.getName());
dataContext.addTable(table);
return table;