Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

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

SapphireTest with cyclic YAML file


Go to End
Reply


2 Posts   577 Views

Avatar
wee-man

Community Member, 21 Posts

1 December 2012 at 10:13pm

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

Avatar
Willr

Forum Moderator, 5517 Posts

2 December 2012 at 5:19pm

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