Jump to:

17488 Posts in 4473 Topics by 1978 members

Archive

SilverStripe Forums » Archive » Annoying database error

Our old forums are still available as a read-only archive.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1298 Views
  • Anonymous user
    Avatar
    Community Member
    1 Post

    Annoying database error Link to this post

    I have a custom join in my DataObject::get() call, but it keeps throwing an error, because I'm joining on "MyTable.ForeignID = ForeignTable.ID" and for some reason, the DataObject appends "_Live" to all the table names, so "MyTable" is not found, but "MyTable_Live" is. I don't want to have to hardcode "_Live" into my join, because then, of course, it will break on the staging site.

    What gives?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Annoying database error Link to this post

    I'm so sick of this error. Every time I use the DataObject I have to evaluate Versioned::current_stage() to see if I need the "_Live" table suffix. Has this been fixed in 2.3?

    1298 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.