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.

All other Modules

Discuss all other Modules here.

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

Event Calendar - get_by_id


Reply

2 Posts   1120 Views

Avatar
toddm

5 September 2009 at 3:39am Community Member, 15 Posts

Hi,

I extended CalendarDateTime and everything was working fine, but when I'm not getting the associated CourseOrEvent when using get_by_id.

CourseOrEvent is an extension of CalendarEvent.

Both of these extensions are based on the tutorial: http://doc.silverstripe.com/doku.php?id=recipes:extending_the_event_calendar&s=recipes%20calendar

Example:
DataObject::get_by_id('CourseOrEventDateTime', $this->_courseoreventdatetimeID)

The CourseOrEventID is being returned as 0 event though it is saved fine in the db.

Any ideas?

I'm running SS 2.3.3 and event_calendar 0.3

Todd

Avatar
UncleCheese

5 September 2009 at 4:18am 4085 Posts

Why is there an underscore in front of it?

I don't really have any context on what you're doing. Can you post some code?