Working with abstract models / inherited models ?

Issue #34 invalid
Anonymous created an issue

Hey there,

i am playing with both mptt and treebeard atm and cannot get them to work with the model setup i'd like to use.

Here's what i'd LIKE to use

abstractModel baseModel(abstractModel, NS_Node) *actualModel(baseModel)

The idea is to have an abstract model to start with. It provides some common fields to stick to DRY. The baseModel is a generic object that is supposed to hold the tree. The actualModel is inheriting from baseModel to add type-specific Fields to mix different objects in a single tree (wich is stored in the baseModel table).

Now no matter what i tried i get unknown column errors when adding children (root nodes work). I also tried without the abstract model and hence having baseModel(NS_Node).

Is there any way to get treebeard to work like outlined ?

Kind Regards and thanks in advance, Thorsten

Comments (2)

  1. Anonymous

    Scrap the abstract basemodel. I'd be fine with any kind of inheritance really. Easytree handles that case fine, but it has quite some bugs and is discontinued.

    Regards, Thorsten

  2. Log in to comment