yii2-relation-trait icon indicating copy to clipboard operation
yii2-relation-trait copied to clipboard

Yii2-dynamic forms - Nested Dynamic Form

Open jonatasfl opened this issue 8 years ago • 6 comments

Firstly thank you for this extension and sorry for my bad english!

I'm using this extension with Yii2-dynamicforms and it works perfecly on simple scenario, avoiding unnecessary code.

Now I'm trying to use with Nested Dynamic Form example and i'm getting this error:

error_relation

This occurs when I create a relation via a junction table in Person model.

public function getHouses()
{
     return $this->hasMany(House::className(), ['person_id' => 'id']);
}
public function getRooms()
{
     return $this->hasMany(Room::className(), ['id' => 'person_id'])->via('houses');
}

Is there any solution to this problem or the extension does not support it?

Thank you!

jonatasfl avatar Aug 29 '16 00:08 jonatasfl

Could you send me your schema?

mootensai avatar Aug 29 '16 02:08 mootensai

Alternative : you could use https://github.com/mootensai/yii2-enhanced-gii

mootensai avatar Aug 29 '16 02:08 mootensai

@mootensai I'm using this example

db-demo3

nested

If your extension to work with nested forms (usually it works with simple dynamic forms), will save many lines of code

Thank you for your attention and sorry for my bad english!

jonatasfl avatar Aug 29 '16 10:08 jonatasfl

Any update on this?? I trying something similar but its not working

deadmantfa avatar Nov 21 '16 12:11 deadmantfa

not yet..currently busy..could someone help?

mootensai avatar Nov 22 '16 03:11 mootensai

please try again with the new version

mootensai avatar Sep 29 '17 02:09 mootensai