Jump to:

3373 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » SapphireTest with cyclic YAML file

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

Page: 1
Go to End
Author Topic: 349 Views
  • wee-man
    Avatar
    Community Member
    21 Posts

    SapphireTest with cyclic YAML file Link to this post

    Hello,

    I'm currently writing tests and found a problem using the YAML object definition. E.g. the following:

    item4:
    Title: Test Item 4
    FirstChild: =>Item.item5
    Next: =>Item.item6

    item5:
    Title: Test Item 5
    Parent: =>Item.item4

    leads to the error

    Undefined index: item5

    .

    Is there a way to define cyclic relations inside the YAML file?

    Greetings
    Michael

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: SapphireTest with cyclic YAML file Link to this post

    AFAIK, no you can't have cyclic objects in SilverStripe YAML system.

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