0

Üritan mappida sellist klassi, mis viitaks iseendale. Ehk siis tootekategooria klass, millel on alamkategooriad. Miskil põhjusel maping ei õnnestu. Parent on ilusti olemas, kuid child objekt on tühi.

ProductCategory:     columns:
    name: { type: string(255), notnull: true}
    position: { type: integer, notnull: true }
    is_activated: { type: boolean, notnull: true, default: 0 }
    parent: { type: integer}

  relations:
    Parent: { onDelete: CASCADE, local: parent, foreign: id, foreignAlias: categories }
    Child: {type: many, class: ProductCategory, local: id, foreign: parent}
flag

Your Answer

Get an OpenID
or

Browse other questions tagged or ask your own question.