phpuser12
phpuser12

Reputation: 355

How to upgrade From Doctrine 1 to Doctrine 2?

I'm using Doctrine 1 with Zend framework, and I have to upgrade from Doctrine 1 to Doctrine 2 to use Data mapper instead of active record design patterns.

Is there anyway or instructions to do it?

Upvotes: 1

Views: 2432

Answers (1)

j0k
j0k

Reputation: 22756

There seems to be a task that convert old doctrine 1 schema into annoted php classes:

doctrine orm:convert-d1-schema

I will let you read this short tutorial on how to do that.

Basically:

  • you need to convert schema to annoted php classes (with the command above)
  • convert your file in your application to use the data mapper

Upvotes: 5

Related Questions