Jump to:

3448 Posts in 1062 Topics by 738 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Another DB Connection

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 359 Views
  • melatonin
    Avatar
    Community Member
    6 Posts

    Another DB Connection Link to this post

    Hi, i have a second mysql database (another host). i like to use it with ORM.
    Someone has a little example to realize it.
    Sorry, before i have never found one.

    thank you

  • swaiba
    Avatar
    Forum Moderator
    1788 Posts

    Re: Another DB Connection Link to this post

    Hi,

    I think this is what you are looking for...

    http://www.silverstripe.org/customising-the-cms/show/13692#post293308

  • melatonin
    Avatar
    Community Member
    6 Posts

    Re: Another DB Connection Link to this post

    Thank you.
    But my plan is to use the intern ORM with a second database.
    native sql statements are not my problem.

  • swaiba
    Avatar
    Forum Moderator
    1788 Posts

    Re: Another DB Connection Link to this post

    There is no difference - once you have done the DB::connect you can use the ORM on whichever database it is (provided it is indeed of the right datamodel)

  • melatonin
    Avatar
    Community Member
    6 Posts

    Re: Another DB Connection Link to this post

    Thank you.
    I understand what do you mean.
    But how i can configure my DataObject Extension to my exist database struktur?
    My table dont have the fields ClassName, Created, LastEdited. The primary key have a another name.
    The creation on dev/build is not needed.
    How i can solve the problems?

    359 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.