lumber icon indicating copy to clipboard operation
lumber copied to clipboard

Inheritance in one collection. Mongoose

Open lomkovsky opened this issue 4 years ago • 2 comments

Expected behavior

Hi there. I have the goal of displaying data that is inherited as a tree of linked data. In the 'Product Categories' collection, I have related data by field 'ancestors'.

'product-categories'.js
...
mongoose.Schema({
...
  'ancestors': [{ type: mongoose.Schema.Types.ObjectId, ref: 'productCategories' }],
...
})

I expect to see something like this: https://drive.google.com/open?id=1-1IbLiZVCIBiT9KzYjuKRNWoYA4CMXw8

Actual behavior

But now I see this: https://drive.google.com/open?id=1imaBCxH6Mn60lju9Gc7qAG3BjopenR5_

Question:

Does Forest Admin enable such way of a displaying (the tree) of related data?

  • Lumber Package Version: 6.13.4
  • Liana Version: 5.7.0
  • Database Dialect: MongoDB
  • Database Version: 4.2

lomkovsky avatar Feb 17 '20 11:02 lomkovsky

Hi @lomkovsky,

The "Actual behavior" link you provided seems broken. Could you update the issue to ensure it is clear enough?

Thanks for your help 🙏

arnaudbesnier avatar Feb 24 '20 07:02 arnaudbesnier

https://drive.google.com/file/d/1imaBCxH6Mn60lju9Gc7qAG3BjopenR5_/view?usp=sharing Hello. Try this one.

lomkovsky avatar Feb 24 '20 13:02 lomkovsky