We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There should be a way to manually tell FA that some models are has-many-embeded. The Forest Admin UI display sub document as embeded.
The Forest Admin UI is also incorrectly display the value.
import { getModelForClass, prop } from '@typegoose/typegoose'; class Meta { @prop() meta?: string; } class Model1 { @prop() field1?: Meta; @prop() field2?: number; } class Model2 { @prop() field3?: string; } export class Holy { @prop({ _id: true, type: Model1 }) public first?: Model1[]; @prop({ _id: true, type: Model2 }) public second?: Model2[]; } export const HolyModel = getModelForClass(Holy); export default HolyModel;
.forestadmin-schema.json
{ "name": "Holy", "nameOld": "holies", "icon": null, "integration": null, "isReadOnly": false, "isSearchable": true, "isVirtual": false, "onlyForRelationships": false, "paginationType": "page", "fields": [{ "field": "_id", "type": "String", "defaultValue": null, "enums": null, "integration": null, "isFilterable": true, "isPrimaryKey": true, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "inverseOf": null, "validations": [] }, { "field": "first", "type": [{ "fields": [{ "field": "field1", "type": { "fields": [{ "field": "meta", "type": "String" }] } }, { "field": "field2", "type": "Number" }, { "field": "_id", "type": "String", "isPrimaryKey": true }] }], "defaultValue": null, "enums": null, "integration": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "inverseOf": null, "validations": [] }, { "field": "second", "type": [{ "fields": [{ "field": "field3", "type": "String" }, { "field": "_id", "type": "String", "isPrimaryKey": true }] }], "defaultValue": null, "enums": null, "integration": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "inverseOf": null, "validations": [] }], "segments": [], "actions": [] }
The text was updated successfully, but these errors were encountered:
fyi, I tried using 'fieldsToFlatten' but it's not working.
Sorry, something went wrong.
@Thenkei anyone please? Isn't this a commercial project?
No branches or pull requests
Expected behavior
There should be a way to manually tell FA that some models are has-many-embeded.
The Forest Admin UI display sub document as embeded.
Actual behavior
The Forest Admin UI is also incorrectly display the value.
Failure Logs
.forestadmin-schema.json
The text was updated successfully, but these errors were encountered: