プラグイン > その他 > 3.X系メーカー管理プラグイン拡張について |
その他
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
beginnerA |
投稿日時: 2020/6/13 1:25
対応状況: −−−
|
新米 登録日: 2020/6/13 居住地: 投稿: 7 |
Re: 3.X系メーカー管理プラグイン拡張について ありがとうございます!本当に助かりました!
Entityには /** * Set Product. * * @param int $Product * * @return $this */ public function setProduct($Product) { $this->Product = $Product; return $this; } /** * Get Product. * * @return \Eccube\Entity\Product */ public function getProduct() { return $this->Product; } こちらを追記していたため、先ほど教えて頂いた ->setProduct($Product) このコードを追加する事で解決されたようです。 ただ、 ->setId($Product->getId()) このコードとの差し替えだと Entity of type Plugin\Maker\Entity\ProductMaker is missing an assigned ID for field 'id'. The identifier generation strategy for this entity requires the ID field to be populated before EntityManager#persist() is called. If you want automatically generated identifiers instead you need to adjust the metadata mapping accordingly. このようなエラーが表示されてしまうようで、 ->setId($Product->getId()) ->setProduct($Product) と続く形であればエラーがでないようです。 まだ素人なので、このエラーが出る意味があまり理解できてはないのですが、、 |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
3.X系メーカー管理プラグイン拡張について | beginnerA | 2020/6/13 0:46 |
Re: 3.X系メーカー管理プラグイン拡張について | 468 | 2020/6/13 1:02 |
» Re: 3.X系メーカー管理プラグイン拡張について | beginnerA | 2020/6/13 1:25 |
Re: 3.X系メーカー管理プラグイン拡張について | 468 | 2020/6/15 9:17 |
Re: 3.X系メーカー管理プラグイン拡張について | beginnerA | 2020/6/30 10:36 |