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

SapphireTest with cyclic YAML file


Reply

2 Posts   434 Views

Avatar
wee-man

1 December 2012 at 10:13pm Community Member, 21 Posts

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

2 December 2012 at 5:19pm Forum Moderator, 5511 Posts

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