Jump to content

Featured Replies

Posted

You are using a hard-coded column name:

	/**
	 * Get the database column which stores the topic ID
	 *
	 * @return	string
	 */
	public static function topicIdColumn()
	{
		return 'topicid';
	}

Can't you use a mapped column from the model to avoid changing files and templates? That happens in apps that uses topics released before the trait.

Solved by Ryan Ashbrook

Go to solution
  • Solution

Classes using the trait can overload the method if the column name does not match - in this case, the trait is simply providing a default value.

Using mapped() would not work, because the "topic" column isn't actually included in the $databaseColumnMap property.

Recently Browsing 0

  • No registered users viewing this page.