DMZ - setting model relationships outside the model |
[eluser]WanWizard[/eluser]
To follow up on this question: I've added a new method "production_cache" to the current dev version of Datamapper on BitBucket. This method solves one of the biggest issues with the schema cache, which is that it is created at the first load of the object, and then forever used. If you make any changes, you have to manually delete the file. Now you don't have to do this, just call this new method, and the schema cache will be updated. If you do this after you have used the new has_one() or has_many() methods, these relations will be saved to the cache as well. You can also do this after you have updated your tables, p.e. using dbforge methods. This is particulary handy in modules, where you want to update relations between core models (or models in other modules) with models a module introduces as soon as you install the module (and create the tables that it needs). |
Messages In This Thread |
DMZ - setting model relationships outside the model - by El Forum - 10-31-2010, 03:37 PM
DMZ - setting model relationships outside the model - by El Forum - 11-01-2010, 12:44 AM
DMZ - setting model relationships outside the model - by El Forum - 11-01-2010, 01:48 AM
DMZ - setting model relationships outside the model - by El Forum - 11-03-2010, 12:26 PM
DMZ - setting model relationships outside the model - by El Forum - 11-03-2010, 04:29 PM
DMZ - setting model relationships outside the model - by El Forum - 11-03-2010, 04:37 PM
DMZ - setting model relationships outside the model - by El Forum - 11-06-2010, 05:09 PM
|