Siol
Siol

Reputation: 411

Doctrine2 Get Table Relations

I need to get one/many To one/many relations informations from an entity with Doctrine2

With Doctrine1 I can do :

Doctrine::getTable('Article')->getRelations();

How to do it with Doctrine2 ?

Upvotes: 0

Views: 224

Answers (1)

Dirk McQuickly
Dirk McQuickly

Reputation: 2139

You can use Doctrine\ORM\Mapping\ClassMetadataFactory for this. $metaData = $em->getMetadataFactory()->getMetadataFor('your_classname')

Upvotes: 1

Related Questions