skinny.orm.feature

AssociationsFeature

trait AssociationsFeature[Entity] extends SkinnyMapperBase[Entity] with ConnectionPoolFeature with AutoSessionFeature with Logging

Associations support feature.

Entity

entity

Self Type
AssociationsFeature[Entity] with scalikejdbc.SQLSyntaxSupport[Entity]
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AssociationsFeature
  2. Logging
  3. AutoSessionFeature
  4. ConnectionPoolFeature
  5. SkinnyMapperBase
  6. SQLSyntaxSupport
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def defaultAlias: Alias[Entity]

    Returns default table alias.

    Returns default table alias. This method is abstract and should be implemented with unique name. override def defaultAlias = createAlias("sm")

    Definition Classes
    SkinnyMapperBase
  2. abstract def extract(rs: WrappedResultSet, n: scalikejdbc.ResultName[Entity]): Entity

    Extracts entity from ResultSet.

    Extracts entity from ResultSet.

    Definition Classes
    SkinnyMapperBase

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(rs: WrappedResultSet): Entity

    Extracts entity from ResultSet.

    Extracts entity from ResultSet.

    Definition Classes
    SkinnyMapperBase
  7. def apply(a: Alias[Entity])(rs: WrappedResultSet): Entity

    Extracts entity from ResultSet.

    Extracts entity from ResultSet.

    Definition Classes
    SkinnyMapperBase
  8. def as(provider: scalikejdbc.QuerySQLSyntaxProvider[scalikejdbc.SQLSyntaxSupport[Entity], Entity]): scalikejdbc.TableAsAliasSQLSyntax

    Definition Classes
    SQLSyntaxSupport
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. val associations: LinkedHashSet[Association[_]]

    Associations

  11. def autoSession: DBSession

    AutoSession definition.

    AutoSession definition.

    Definition Classes
    AutoSessionFeature
  12. def belongsTo[A](right: AssociationsWithIdFeature[_, A], merge: (Entity, Option[A]) ⇒ Entity): BelongsToAssociation[Entity]

  13. def belongsToWithAlias[A](right: (AssociationsWithIdFeature[_, A], Alias[A]), merge: (Entity, Option[A]) ⇒ Entity): BelongsToAssociation[Entity]

  14. def belongsToWithAliasAndFk[A](right: (AssociationsWithIdFeature[_, A], Alias[A]), fk: String, merge: (Entity, Option[A]) ⇒ Entity): BelongsToAssociation[Entity]

  15. def belongsToWithAliasAndFkAndJoinCondition[A](right: (AssociationsFeature[A], Alias[A]), fk: String, on: scalikejdbc.SQLSyntax, merge: (Entity, Option[A]) ⇒ Entity): BelongsToAssociation[Entity]

  16. def belongsToWithFk[A](right: AssociationsWithIdFeature[_, A], fk: String, merge: (Entity, Option[A]) ⇒ Entity): BelongsToAssociation[Entity]

  17. def belongsToWithFkAndJoinCondition[A](right: AssociationsFeature[A], fk: String, on: scalikejdbc.SQLSyntax, merge: (Entity, Option[A]) ⇒ Entity): BelongsToAssociation[Entity]

  18. def belongsToWithJoinCondition[A](right: AssociationsWithIdFeature[_, A], on: scalikejdbc.SQLSyntax, merge: (Entity, Option[A]) ⇒ Entity): BelongsToAssociation[Entity]

  19. def clearLoadedColumns(): Unit

    Definition Classes
    SQLSyntaxSupport
  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. def column: scalikejdbc.ColumnName[Entity]

    Definition Classes
    SQLSyntaxSupport
  22. def columnNames: Seq[String]

    Returns column names.

    Returns column names.

    Definition Classes
    SkinnyMapperBase → SQLSyntaxSupport
  23. def columns: Seq[String]

    Definition Classes
    SQLSyntaxSupport
  24. def connectionPool: ConnectionPool

    Returns connection pool.

    Returns connection pool.

    returns

    pool

    Definition Classes
    ConnectionPoolFeature
  25. def connectionPoolName: Any

    Definition Classes
    SQLSyntaxSupport
  26. def createAlias(name: String): Alias[Entity]

    Creates a new table alias for this mapper.

    Creates a new table alias for this mapper.

    Definition Classes
    SkinnyMapperBase
  27. def createJoinDefinition(joinType: JoinType, left: (AssociationsFeature[_], Alias[_]), right: (AssociationsFeature[_], Alias[_]), on: scalikejdbc.SQLSyntax): JoinDefinition[Entity]

    Creates a new join definition.

    Creates a new join definition.

    joinType

    join type

    left

    left mapper and table alias

    right

    right mapper and table alias

    on

    join condition

    returns

    join definition

  28. def debug(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  29. def debug(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  30. val defaultBelongsToExtractors: LinkedHashSet[BelongsToExtractor[Entity]]

  31. val defaultHasOneExtractors: LinkedHashSet[HasOneExtractor[Entity]]

  32. val defaultJoinDefinitions: LinkedHashSet[JoinDefinition[_]]

    Join definitions that are enabled by default.

  33. val defaultOneToManyExtractors: LinkedHashSet[HasManyExtractor[Entity]]

  34. def defaultScope(alias: Alias[Entity]): Option[scalikejdbc.SQLSyntax]

    Returns default scope for select queries.

    Returns default scope for select queries.

    Definition Classes
    SkinnyMapperBase
  35. def defaultScopeWithDefaultAlias: Option[scalikejdbc.SQLSyntax]

    Definition Classes
    SkinnyMapperBase
  36. def defaultSelectQuery: scalikejdbc.SelectSQLBuilder[Entity]

    Returns th default select query builder for this mapper.

    Returns th default select query builder for this mapper.

    returns

    select query builder

    Definition Classes
    AssociationsFeatureSkinnyMapperBase
  37. def delimiterForResultName: String

    Definition Classes
    SQLSyntaxSupport
  38. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  40. def error(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  41. def error(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  42. def extract(sql: SQL[Entity, NoExtractor])(implicit includesRepository: IncludesQueryRepository[Entity] = IncludesQueryRepository[Entity]()): SQL[Entity, HasExtractor]

  43. def extractBelongsTo[That](mapper: AssociationsFeature[That], fk: String, alias: Alias[That], merge: (Entity, Option[That]) ⇒ Entity, includesMerge: (Seq[Entity], Seq[That]) ⇒ Seq[Entity] = defaultIncludesMerge[Entity, That]): BelongsToExtractor[Entity]

  44. def extractHasOne[That](mapper: AssociationsFeature[That], fk: String, alias: Alias[That], merge: (Entity, Option[That]) ⇒ Entity, includesMerge: (Seq[Entity], Seq[That]) ⇒ Seq[Entity] = defaultIncludesMerge[Entity, That]): HasOneExtractor[Entity]

  45. def extractOneToMany[M1](mapper: AssociationsFeature[M1], alias: Alias[M1], merge: (Entity, Seq[M1]) ⇒ Entity, includesMerge: (Seq[Entity], Seq[M1]) ⇒ Seq[Entity] = defaultIncludesMerge[Entity, M1]): HasManyExtractor[Entity]

  46. def extractOneToManyWithDefaults[M1](mapper: AssociationsFeature[M1], merge: (Entity, Seq[M1]) ⇒ Entity, includesMerge: (Seq[Entity], Seq[M1]) ⇒ Seq[Entity] = defaultIncludesMerge[Entity, M1]): HasManyExtractor[Entity]

    One-to-Many relationship definition.

    One-to-Many relationship definition.

    object Member extends RelationshipFeature[Member] {
    oneToMany[Group](
      mapper = Group,
      merge = (m, c) => m.copy(company = c)
    )
    }
  47. def extractWithAssociations(sql: SQL[Entity, NoExtractor], belongsToAssociations: Seq[BelongsToAssociation[Entity]], hasOneAssociations: Seq[HasOneAssociation[Entity]], oneToManyAssociations: Seq[HasManyAssociation[Entity]])(implicit includesRepository: IncludesQueryRepository[Entity] = IncludesQueryRepository[Entity]()): SQL[Entity, HasExtractor]

    Creates an extractor for this query.

    Creates an extractor for this query.

    sql

    sql object

    belongsToAssociations

    belongsTo associations

    hasOneAssociations

    hasOne associations

    oneToManyAssociations

    hasMany associations

    returns

    sql object

  48. def extractWithOneToOneTables(rs: WrappedResultSet, belongsToExtractors: Set[BelongsToExtractor[Entity]], hasOneExtractors: Set[HasOneExtractor[Entity]])(implicit includesRepository: IncludesQueryRepository[Entity]): Entity

    Extracts entity with one-to-one tables.

    Extracts entity with one-to-one tables.

    rs

    result set

    belongsToExtractors

    belongsTo extractors

    hasOneExtractors

    hasOne extractors

    returns

    entity

  49. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  50. def forceUpperCase: Boolean

    Definition Classes
    SQLSyntaxSupport
  51. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  52. def hasMany[M](many: (AssociationsWithIdFeature[_, M], Alias[M]), on: (Alias[Entity], Alias[M]) ⇒ scalikejdbc.SQLSyntax, merge: (Entity, Seq[M]) ⇒ Entity): HasManyAssociation[Entity]

  53. def hasManyThrough[M1, M2](through: (AssociationsFeature[M1], Alias[M1]), throughOn: (Alias[Entity], Alias[M1]) ⇒ scalikejdbc.SQLSyntax, many: (AssociationsWithIdFeature[_, M2], Alias[M2]), on: (Alias[M1], Alias[M2]) ⇒ scalikejdbc.SQLSyntax, merge: (Entity, Seq[M2]) ⇒ Entity): HasManyAssociation[Entity]

  54. def hasManyThrough[M2](through: AssociationsFeature[_], many: AssociationsWithIdFeature[_, M2], merge: (Entity, Seq[M2]) ⇒ Entity): HasManyAssociation[Entity]

  55. def hasManyThroughWithFk[M2](through: AssociationsFeature[_], many: AssociationsWithIdFeature[_, M2], throughFk: String, manyFk: String, merge: (Entity, Seq[M2]) ⇒ Entity): HasManyAssociation[Entity]

  56. def hasOne[A](right: AssociationsWithIdFeature[_, A], merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  57. def hasOneWithAlias[A](right: (AssociationsWithIdFeature[_, A], Alias[A]), merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  58. def hasOneWithAliasAndFk[A](right: (AssociationsWithIdFeature[_, A], Alias[A]), fk: String, merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  59. def hasOneWithAliasAndFkAndJoinCondition[A](right: (AssociationsFeature[A], Alias[A]), fk: String, on: scalikejdbc.SQLSyntax, merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  60. def hasOneWithAliasAndJoinCondition[A](right: (AssociationsWithIdFeature[_, A], Alias[A]), on: scalikejdbc.SQLSyntax, merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  61. def hasOneWithFk[A](right: AssociationsWithIdFeature[_, A], fk: String, merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  62. def hasOneWithFkAndJoinCondition[A](right: AssociationsFeature[A], fk: String, on: scalikejdbc.SQLSyntax, merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  63. def hasOneWithJoinCondition[A](right: AssociationsWithIdFeature[_, A], on: scalikejdbc.SQLSyntax, merge: (Entity, Option[A]) ⇒ Entity): HasOneAssociation[Entity]

  64. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  65. def info(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  66. def info(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  67. def innerJoin[Left](left: (AssociationsFeature[Left], Alias[Left]), right: (AssociationsFeature[_], Alias[_]), on: (Alias[Left], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  68. def innerJoin(right: (AssociationsFeature[_], Alias[_]), on: (Alias[Entity], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  69. def innerJoinWithDefaults[Left](left: AssociationsFeature[Left], right: AssociationsFeature[_], on: (Alias[Left], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  70. def innerJoinWithDefaults(right: AssociationsFeature[_], on: (Alias[Entity], Alias[Any]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  71. def innerJoinWithDefaults(right: AssociationsFeature[_], on: scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  72. def isDebugEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  73. def isErrorEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  74. def isInfoEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  75. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  76. def isTraceEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  77. def isValidFieldName(name: String): Boolean

    Predicates the field name is valid.

    Predicates the field name is valid.

    Definition Classes
    SkinnyMapperBase
  78. def isWarnEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  79. def join[Left](left: (AssociationsFeature[Left], Alias[Left]), right: (AssociationsFeature[_], Alias[_]), on: (Alias[Left], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  80. def join(right: (AssociationsFeature[_], Alias[_]), on: (Alias[Entity], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  81. def joinWithDefaults[Left](left: AssociationsFeature[Left], right: AssociationsFeature[_], on: (Alias[Left], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  82. def joinWithDefaults(right: AssociationsFeature[_], on: (Alias[Entity], Alias[Any]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  83. def joinWithDefaults(right: AssociationsFeature[_], on: scalikejdbc.SQLSyntax): JoinDefinition[Entity]

  84. def leftJoin(left: (AssociationsFeature[_], Alias[_]), right: (AssociationsFeature[_], Alias[_]), on: (Alias[_], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[_]

  85. def leftJoin(right: (AssociationsFeature[_], Alias[_]), on: (Alias[Entity], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[_]

  86. def leftJoinWithDefaults(left: AssociationsFeature[_], right: AssociationsFeature[_], on: (Alias[_], Alias[_]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[_]

  87. def leftJoinWithDefaults(right: AssociationsFeature[_], on: (Alias[Entity], Alias[Any]) ⇒ scalikejdbc.SQLSyntax): JoinDefinition[_]

  88. def leftJoinWithDefaults(right: AssociationsFeature[_], on: scalikejdbc.SQLSyntax): JoinDefinition[_]

  89. def logger: Logger

    Attributes
    protected
    Definition Classes
    Logging
  90. def loggerName: String

    Attributes
    protected
    Definition Classes
    Logging
  91. def nameConverters: Map[String, String]

    Definition Classes
    SQLSyntaxSupport
  92. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  93. final def notify(): Unit

    Definition Classes
    AnyRef
  94. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  95. def primaryKeyField: scalikejdbc.SQLSyntax

    Definition Classes
    SkinnyMapperBase
  96. def primaryKeyFieldName: String

    Returns primary key name.

    Returns primary key name. (default: "id") Notice: Not a column name but field name. For example, not "first_name" but "firstName"

    Definition Classes
    SkinnyMapperBase
  97. def schemaName: Option[String]

    Definition Classes
    SQLSyntaxSupport
  98. def selectQueryWithAdditionalAssociations(sql: scalikejdbc.SelectSQLBuilder[Entity], belongsToAssociations: Seq[BelongsToAssociation[Entity]], hasOneAssociations: Seq[HasOneAssociation[Entity]], hasManyAssociations: Seq[HasManyAssociation[Entity]]): scalikejdbc.SelectSQLBuilder[Entity]

    Returns a select query builder that all associations are joined.

    Returns a select query builder that all associations are joined.

    sql

    sql object

    belongsToAssociations

    belongsTo associations

    hasOneAssociations

    hasOne associations

    hasManyAssociations

    hasMany associations

    returns

    select query builder

  99. def selectQueryWithAssociations: scalikejdbc.SelectSQLBuilder[Entity]

  100. def setAsByDefault(extractor: HasManyExtractor[Entity]): Unit

  101. def setAsByDefault(extractor: HasOneExtractor[Entity]): Unit

  102. def setAsByDefault(extractor: BelongsToExtractor[Entity]): Unit

  103. def singleSelectQuery: scalikejdbc.SelectSQLBuilder[Entity]

    Returns select query builder object to simply fetch rows without other joined tables.

    Returns select query builder object to simply fetch rows without other joined tables.

    Definition Classes
    SkinnyMapperBase
  104. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  105. def syntax(name: String): scalikejdbc.QuerySQLSyntaxProvider[scalikejdbc.SQLSyntaxSupport[Entity], Entity]

    Definition Classes
    SQLSyntaxSupport
  106. def syntax: scalikejdbc.QuerySQLSyntaxProvider[scalikejdbc.SQLSyntaxSupport[Entity], Entity]

    Definition Classes
    SQLSyntaxSupport
  107. def table: scalikejdbc.TableDefSQLSyntax

    Definition Classes
    SQLSyntaxSupport
  108. def tableName: String

    Returns table name.

    Returns table name.

    Definition Classes
    SkinnyMapperBase → SQLSyntaxSupport
  109. def tableNameWithSchema: String

    Definition Classes
    SQLSyntaxSupport
  110. def toDefaultForeignKeyName[A](mapper: AssociationsFeature[A]): String

    Expects mapper's name + primary key name by default.

    Expects mapper's name + primary key name by default.

    A

    enitty type

    mapper

    mapper

    returns

    fk name

    Attributes
    protected
  111. def toString(): String

    Definition Classes
    AnyRef → Any
  112. def trace(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  113. def trace(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  114. def underlying: SkinnyMapperBase[Entity]

    Attributes
    protected
    Definition Classes
    SkinnyMapperBase
  115. def useShortenedResultName: Boolean

    Definition Classes
    SQLSyntaxSupport
  116. def useSnakeCaseColumnName: Boolean

    Definition Classes
    SQLSyntaxSupport
  117. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  118. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  119. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  120. def warn(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  121. def warn(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  122. def withAlias[A](name: String)(op: (Alias[Entity]) ⇒ A): A

    Provides a code block with a table alias.

    Provides a code block with a table alias.

    Definition Classes
    SkinnyMapperBase
  123. def withAlias[A](op: (Alias[Entity]) ⇒ A): A

    Provides a code block with a table alias.

    Provides a code block with a table alias.

    Definition Classes
    SkinnyMapperBase
  124. def withColumns[A](op: (scalikejdbc.ColumnName[Entity]) ⇒ A): A

    Provides a code block with the column name provider.

    Provides a code block with the column name provider.

    Definition Classes
    SkinnyMapperBase

Inherited from Logging

Inherited from AutoSessionFeature

Inherited from ConnectionPoolFeature

Inherited from SkinnyMapperBase[Entity]

Inherited from scalikejdbc.SQLSyntaxSupport[Entity]

Inherited from AnyRef

Inherited from Any

Ungrouped