does Storing related records example have error?

i try to test the example in docs of Storing related records .

same code as the example,but it shows error

Catchable fatal error: Object of class Artist could not be converted to string in



36.3k

Hi

It could be the quote ' copy then paste into your code



2.3k

i have copied same code as the example.it shows the error above.