2

エンティティ プロキシ オブジェクトをエンティティ オブジェクトに変換できるかどうかを知りたいです。

User エンティティではなく UserProxy エンティティを取得しています。このオブジェクトをリフレクションしてプロパティを取得すると、User プロパティが取得されません。ユーザー プロキシ オブジェクトからユーザー プロパティを取得するにはどうすればよいですか?

ありがとうございました。

4

1 に答える 1

0

you can get the real name of proxy class with this methode :

$entityName = $em->getClassMetadata($myProxyEntity)->rootEntityName;

Once you have your real entity Name, you can create a reflection class

于 2012-10-03T15:18:30.680 に答える