Some values not set when pushing schema to MongoDB


#1

I’m having difficulty PUSHing a schema to MongoDB via the DreamFactory API. The same schema works as expected when PUSHed to MySQL. While some values get set appropriately, some of the values don’t get set or are set to their default values (e.g. “allow_null”, “is_unique”, “default”, etc). Here is a simplified example of the schema:

{“resource”: [
{
“name”: “df”,
“field”: [
{
“name”: “file”,
“label”: “File Name”,
“description”: “Name of a data file”,
“type”: “string”,
“default”: “test”,
“is_unique”: true,
“allow_null”: false
}
]
}
]
}

When this is pushed to MongoDB, the result of getting “_schema/df” is:

{
“alias”: null,
“name”: “df”,
“label”: “Df”,
“description”: null,
“native”: [],
“plural”: “Dfs”,
“is_view”: false,
“primary_key”: [
“_id”
],
“name_field”: null,
“field”: [
{
“alias”: null,
“name”: “_id”,
“label”: " Id",
“description”: null,
“native”: [],
“type”: null,
“db_type”: “string”,
“length”: null,
“precision”: null,
“scale”: null,
“default”: null,
“required”: false,
“allow_null”: true,
“fixed_length”: false,
“supports_multibyte”: false,
“auto_increment”: true,
“is_primary_key”: true,
“is_unique”: false,
“is_index”: false,
“is_foreign_key”: false,
“ref_table”: null,
“ref_field”: null,
“ref_on_update”: null,
“ref_on_delete”: null,
“picklist”: null,
“validation”: null,
“db_function”: null,
“is_virtual”: false,
“is_aggregate”: false
},
{
“alias”: null,
“name”: “file”,
“label”: “File Name”,
“description”: “Name of a data file”,
“native”: [],
“type”: “string”,
“db_type”: null,
“length”: null,
“precision”: null,
“scale”: null,
“default”: null,
“required”: false,
“allow_null”: true,
“fixed_length”: false,
“supports_multibyte”: false,
“auto_increment”: false,
“is_primary_key”: false,
“is_unique”: false,
“is_index”: false,
“is_foreign_key”: false,
“ref_table”: null,
“ref_field”: null,
“ref_on_update”: null,
“ref_on_delete”: null,
“picklist”: null,
“validation”: null,
“db_function”: null,
“is_virtual”: false,
“is_aggregate”: false
}
],
“related”: [],
“constraints”: [],
“access”: 31
}

On the other hand, when pushed to MySQL, the result of getting “_schema/df” is:

{
“alias”: null,
“name”: “df”,
“label”: “Df”,
“description”: null,
“native”: [],
“plural”: “Dfs”,
“is_view”: false,
“primary_key”: [
“file”
],
“name_field”: null,
“field”: [
{
“alias”: null,
“name”: “file”,
“label”: “File Name”,
“description”: “Name of a data file”,
“native”: [],
“type”: “string”,
“db_type”: “varchar(255)”,
“length”: 255,
“precision”: null,
“scale”: null,
“default”: “test”,
“required”: false,
“allow_null”: false,
“fixed_length”: false,
“supports_multibyte”: true,
“auto_increment”: false,
“is_primary_key”: true,
“is_unique”: true,
“is_index”: false,
“is_foreign_key”: false,
“ref_table”: null,
“ref_field”: null,
“ref_on_update”: null,
“ref_on_delete”: null,
“picklist”: null,
“validation”: null,
“db_function”: null,
“is_virtual”: false,
“is_aggregate”: false
}
],
“related”: [],
“constraints”: {
“file”: {
“constraint_type”: “UNIQUE”,
“constraint_schema”: “bitnami_df”,
“constraint_name”: “file”,
“table_schema”: “bitnami_df”,
“table_name”: “df”,
“column_name”: “file”,
“referenced_table_schema”: null,
“referenced_table_name”: null,
“referenced_column_name”: null,
“update_rule”: null,
“delete_rule”: null
},
“undx_bitnami_df_df_file”: {
“constraint_type”: “UNIQUE”,
“constraint_schema”: “bitnami_df”,
“constraint_name”: “undx_bitnami_df_df_file”,
“table_schema”: “bitnami_df”,
“table_name”: “df”,
“column_name”: “file”,
“referenced_table_schema”: null,
“referenced_table_name”: null,
“referenced_column_name”: null,
“update_rule”: null,
“delete_rule”: null
}
},
“access”: 31
}

Am I doing something wrong here?