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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

[SOLVED] Weird DataObject class behavior


Reply

584 Views

Avatar
Soft

7 November 2009 at 3:26am (Last edited: 7 November 2009 3:47am), Community Member, 3 Posts

I've just spent the last couple of hours trying to figure out why my DataObject->write call doesn't write to the database. I narrowed to problem to the write method, it looks like when trying to get which table to write to it doesn't work. When checking ancestry and has_own_table it failed. It has never happend before so I guessed it had to do with something in my class name. I changed it from GDText to GdText and suddenly everything works like a charm.

I haven't had time to figure out exactly why this happens yet. Is it something I've missed in the documentation about naming classes or is it something else?

Looks like I hade a subfolder in code that had a class with that same name.