Question

I'm well aware of the standard SilverStripe Data Structure and table/field naming conventions. But how do you integrate SilverStripe with a pre-existing database? Is there any way to map existing tables/fields with a different naming convention to be useable by the SilverStripe ORM and DataObjects? Also, is it possible to use the ORM with two different databases?

Was it helpful?

Solution

In a recent project I had the same issue, and I solved creating views in the SS database over the CRM database, in order to present to SilverStripe the data in the way it likes. Obviously I also created DataObjects mapping the data, and so no dev/build is needed. It's not an easy way to do it, but if you're lucky and the second database logic is similar to SS logic it's a feasible task.

Now I have a CRM that write data into its database with its logic, and SS that reads it through views as if it were its own DataObject.

Good luck :)

OTHER TIPS

I am afraid that, as far as I know, the answer to both questions is no.

I guess the best option would be to write an importer that connects to the old database, fetches the data, and then creates silverstripe objects for it.

If you have to run both systems at a time it will be come trick. The first thing I would consider here would probably be a rest api between the 2 systems, but not sure how well that would work out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top