3062 Posts in 864 Topics by 646 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 995 Views |
-
Lock a DataObject's table against DDL updates

12 April 2010 at 12:15am
If I want to point a DataObject at a third-party table (i.e. from another application running in the same space), is there something I can add to the DataObject to prevent SilverStripe from ever trying to change the structure of that table?
-- Jason
-
Re: Lock a DataObject's table against DDL updates

13 April 2010 at 8:39pm
We've written wrappers for DataObjects before, basically overloading __construct() and write(), although there's no real ORM support for custom table names, column mappings etc. You're probably best off writing a "table data gateway" pattern implementation (http://martinfowler.com/eaaCatalog/tableDataGateway.html) which acts similar to the SilverStripe ORM (implementing get(), get_one(), etc). If you extend the object class from ViewableData, you should be able to use a lot of it in a template context already.
| 995 Views | ||
|
Page:
1
|
Go to Top |


