So I'm trying to find a way to get a collection of all versions of a versionable Doctrine Record. Is this possible? I could definitely build something that would do it but I wasn't sure if the functionality was already built in. Thanks in advance, John
+2
A:
I'm pretty sure that Doctrine's (at least 1.2 version) versionable behaviour doesn't define any additional methods for your model except revert()
that allows you to revert previous version of resource.
So you'll have to do everything by your own.
Crozin
2010-03-22 20:58:13
Yeah that's what I was thinking. Thanks for your help though.
jjbohn
2010-03-23 17:33:42
+1
A:
you can query on the Version table: Doctrine::getTable('EntityVersions')->findAllById($entity_id);
gyaan: for any Version table, the PK is jointly placed on the id & version. Unlike default doctrine style, there is no surrogate key!
Prasad
2010-07-09 04:35:07