バージョン選択

フォーラム

メニュー

オンライン状況

33 人のユーザが現在オンラインです。 (26 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 33
もっと...

サイト内検索

質問 > その他 > oneToManyでfindeしてもデータが取得できない

その他

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
boonen
投稿日時: 2017/3/19 17:40
対応状況: −−−
半人前
登録日: 2017/3/7
居住地:
投稿: 15
oneToManyでfindeしてもデータが取得できない
[EC-CUBE] 3.0.14 新規インストール
[レンタルサーバ] さくらVPS
[OS] CentOS release 6.8
[PHP] PHP 7.0.16
[データベース] MySQL 5.1.73
[WEBサーバ] Apache/2.2.15
[ブラウザ] Chrome
[導入プラグインの有無] 無し
[カスタマイズの有無] 有り
[現象]
コアコードをカスタムしているのですが、oneToManyリレーションを張ってfindしてみても、リレーション先のテーブル取得ができません。
コアコードを見てみると、innnerjoinを多用しているようですが、そのようにしないといけないのでしょうか?
下記にymlと、findした変数のdump結果を貼り付けておきます。
find自体はできてるのですが、リレーション先のデータがnullになってしまっているのです。

Eccube\Entity\Tellerschedule:
    type: entity
    table: dtb_tellerschedule
    repositoryClass: Eccube\Repository\TellerscheduleRepository
    id:
中略・・
    manyToOne:
        Fortuneteller:
            targetEntity: Eccube\Entity\Fortuneteller
            inversedBy: Tellerschedule
            joinColumn:
                name: fortuneteller_id
                referencedColumnName: id

Eccube\Entity\Fortuneteller:
    type: entity
    table: dtb_fortuneteller
    repositoryClass: Eccube\Repository\FortunetellerRepository
    id: 
中略・・・
    oneToMany:
        Tellerschedule:
            targetEntity: Eccube\Entity\Tellerschedule
            mappedBy: Fortuneteller





(dump結果)
array:1 [▼
  0 => Tellerschedule {#1843 ▼
    -id: 4
    -fortuneteller_id: 4
中略・・・
    -update_date: DateTime {#1841 ▶}
    -Fortuneteller: Fortuneteller {#1863 ▼
      +__isInitialized__: false
      -id: 4
      -member_id: null
      -product_id: null
      -create_date: null
      -update_date: null
      -Member: null
      -Tellerschedule: null
       …2
    }
  }
]
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
 » oneToManyでfindeしてもデータが取得できない boonen 2017/3/19 17:40
     Re: oneToManyでfindeしてもデータが取得できない umebius 2017/3/20 16:35
     Re: oneToManyでfindeしてもデータが取得できない nyorai 2017/3/22 9:24
     Re: oneToManyでfindeしてもデータが取得できない hmorita_j 2017/3/22 10:12
       Re: oneToManyでfindeしてもデータが取得できない boonen 2017/3/24 11:22
         Re: oneToManyでfindeしてもデータが取得できない nyorai 2017/3/24 11:48
         Re: oneToManyでfindeしてもデータが取得できない hmorita_j 2017/3/24 12:24
           Re: oneToManyでfindeしてもデータが取得できない boonen 2017/3/24 13:55
             Re: oneToManyでfindeしてもデータが取得できない nyorai 2017/3/24 14:17
               Re: oneToManyでfindeしてもデータが取得できない boonen 2017/3/24 14:39
                 Re: oneToManyでfindeしてもデータが取得できない umebius 2017/3/24 14:43
                   Re: oneToManyでfindeしてもデータが取得できない boonen 2017/3/24 16:07
                     Re: oneToManyでfindeしてもデータが取得できない umebius 2017/3/24 16:14
                       Re: oneToManyでfindeしてもデータが取得できない boonen 2017/3/24 17:41
                         Re: oneToManyでfindeしてもデータが取得できない umebius 2017/3/24 21:05
                           Re: oneToManyでfindeしてもデータが取得できない boonen 2017/3/25 11:34
                       Re: oneToManyでfindeしてもデータが取得できない hmorita_j 2017/3/24 18:18

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,808名です
総投稿数は109,972件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1644
8
red
1570
9
mcontact
1289
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.