Jump to:

3448 Posts in 1062 Topics by 738 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Datalists, write() and SS3

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

Page: 1
Go to End
Author Topic: 618 Views
  • alexyoungs
    Community Member
    5 Posts

    Datalists, write() and SS3 Link to this post

    Hi folks,

    I'm scratching my head a little bit trying to figure out what the Datalist equivalent of the following is:

    $member = new Member();
    $member->Name = "Alex";

    When I execute this, I keep getting "the method 'write' does not exist on 'DataList'". I'm either missing something completely obvious or the documentation isn't great for the new ORM.

    Can anyone help?!



  • swaiba
    Forum Moderator
    1788 Posts

    Re: Datalists, write() and SS3 Link to this post

    Hi Alex,

    The issue is that Member is extended from DataObject, not DataObjectSet. Datalist is replacing DataObjectSet. I'm no expert but I think DataObject is not changed too much.

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.