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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Event Calendar - get_by_id


Go to End


2 Posts   1847 Views

Avatar
toddm

Community Member, 15 Posts

5 September 2009 at 3:39am

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

Forum Moderator, 4102 Posts

5 September 2009 at 4:18am

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?