# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: dan@reciprocitylabs.com
# Maintained By: dan@reciprocitylabs.com

from ggrc import db
from .mixins import Base

class SectionObjective(Base, db.Model):
  __tablename__ = 'section_objectives'

  section_id = db.Column(db.Integer, db.ForeignKey('sections.id'))
  objective_id = db.Column(db.Integer, db.ForeignKey('objectives.id'))

  _publish_attrs = [
      'section',
      'objective',
      ]

  @classmethod
  def eager_query(cls):
    from sqlalchemy import orm

    query = super(SectionObjective, cls).eager_query()
    return query.options(
        orm.subqueryload('section'),
        orm.subqueryload('objective'))

@@ -422,16 +422,32 @@
 ons.id')
+, nullable=False
 )%0A  obje
@@ -509,16 +509,32 @@
 ves.id')
+, nullable=False
 )%0A%0A  _pu
@@ -822,8 +822,111 @@
 tive'))%0A
+%0A  def _display_name(self):%0A    return self.section.display_name + '%3C-%3E' + self.objective.display_name%0A

Add missing _display_name method