ManyToMany

org.squeryl.dsl.ManyToMany
trait ManyToMany[O, A] extends Query[O]

This trait is what is referred by both the left and right side of a manyToMany relation. Type parameters are : O: the type at the "other" side of the relation A: the association type i.e. the entity in the "middle" of the relation

Object mapping to the "middle" entity are called "association objects"

this trait extends Query[O] and can be queried against like a normal query.

Note that this trait is used on both "left" and "right" sides of the relation, but in a given relation

Attributes

Source
ManyToMany.scala
Graph
Supertypes
trait Query[O]
trait Queryable[O]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def assign(o: O, a: A): A

Value parameters

a:

the association object Sets the foreign keys of the association object to the primary keys of the left and right side, this method does not update the database, changes to the association object must be done for the operation to be persisted. Alternatively the method 'associate(o, a)' will call this assign(o, a) and persist the changes.

Attributes

Returns

the 'a' parameter is returned

Source
ManyToMany.scala
def assign(o: O): A

Creates a new association object 'a' and calls assign(o,a)

Creates a new association object 'a' and calls assign(o,a)

Attributes

Source
ManyToMany.scala
def associate(o: O, a: A): A

Value parameters

a:

the association object Calls assign(o,a) and persists the changes the database, by inserting or updating 'a', depending on if it has been persisted or not.

Attributes

Returns

the 'a' parameter is returned

Source
ManyToMany.scala
def associate(o: O): A

Creates a new association object 'a' and calls associate(o,a)

Creates a new association object 'a' and calls associate(o,a)

Note that this method will fail if the association object has NOT NULL constraint fields apart from the foreign keys in the relations

Attributes

Source
ManyToMany.scala
def associationMap: Query[(O, A)]

Attributes

Returns

a Query of Tuple2 containing all objects on the 'other side' along with their association object

Source
ManyToMany.scala

a Query returning all of this member's association entries

a Query returning all of this member's association entries

Attributes

Source
ManyToMany.scala
def dissociate(o: O): Boolean

Causes the deletion of the 'Association object' between this side and the other side of the relation.

Causes the deletion of the 'Association object' between this side and the other side of the relation.

Attributes

Returns

true if 'o' was associated (if an association object existed between 'this' and 'o') false otherwise

Source
ManyToMany.scala
def dissociateAll: Int

Deletes all "associations" relating this "side" to the other

Deletes all "associations" relating this "side" to the other

Attributes

Source
ManyToMany.scala
def kedL: KeyedEntityDef[O, _]

Attributes

Source
ManyToMany.scala

Inherited methods

Attributes

Inherited from:
Query
Source
Query.scala
def distinct: Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def dumpAst: String

Attributes

Inherited from:
Query
Source
Query.scala
def except(q: Query[O]): Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def exceptAll(q: Query[O]): Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def forUpdate: Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def headOption: Option[R]

Attributes

Inherited from:
Query
Source
Query.scala
def intersect(q: Query[O]): Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def intersectAll(q: Query[O]): Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def iterator: Iterator[R]

Attributes

Inherited from:
Query
Source
Query.scala
def name: String

Attributes

Inherited from:
Queryable
Source
Queryable.scala
def page(offset: Int, pageLength: Int): Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def single: R

Returns the first row of the query. An exception will be thrown if the query returns no row or more than one row.

Returns the first row of the query. An exception will be thrown if the query returns no row or more than one row.

Attributes

Inherited from:
Query
Source
Query.scala
def singleOption: Option[R]

Returns Some(singleRow), None if there are none, throws an exception if the query returns more than one row.

Returns Some(singleRow), None if there are none, throws an exception if the query returns more than one row.

Attributes

Inherited from:
Query
Source
Query.scala
def statement: String

returns a 'pretty' statement, i.e. values are printed instead of '?'

returns a 'pretty' statement, i.e. values are printed instead of '?'

Attributes

Inherited from:
Query
Source
Query.scala
def union(q: Query[O]): Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def unionAll(q: Query[O]): Query[R]

Attributes

Inherited from:
Query
Source
Query.scala
def where(whereClauseFunctor: O => LogicalBoolean)(implicit dsl: QueryDsl): Query[T]

Attributes

Inherited from:
Queryable
Source
Queryable.scala