Tabnine Logo
Association.setOwningSide
Code IndexAdd Tabnine to your IDE (free)

How to use
setOwningSide
method
in
org.grails.datastore.mapping.model.types.Association

Best Java code snippets using org.grails.datastore.mapping.model.types.Association.setOwningSide (Showing top 1 results out of 315)

origin: org.grails/grails-datastore-core

protected void configureOwningSide(Association association) {
  PersistentEntity associatedEntity = association.getAssociatedEntity();
  if(associatedEntity == null) {
    association.setOwningSide(true);
  }
  else {
    if (association.isBidirectional()) {
      if (associatedEntity.isOwningEntity(association.getOwner())) {
        association.setOwningSide(true);
      }
    }
    else {
      if (association instanceof OneToOne) {
        if (associatedEntity.isOwningEntity(association.getOwner()))
          association.setOwningSide(true);
      } else if (!(association instanceof Basic)) {
        if (associatedEntity.isOwningEntity(association.getOwner())) {
          association.setOwningSide(true);
        }
        else {
          association.setOwningSide(false);
        }
      }
    }
  }
}
org.grails.datastore.mapping.model.typesAssociationsetOwningSide

Javadoc

Sets whether this association is the owning side

Popular methods of Association

  • getAssociatedEntity
  • getName
  • getInverseSide
  • getOwner
  • getType
  • isBidirectional
  • isEmbedded
  • isOwningSide
    Returns whether this side owns the relationship. This controls the default cascading behavior if non
  • buildCascadeOperations
  • doesCascade
    Returns true if the this association cascade for the given cascade operation
  • getCascadeOperations
  • getFetchStrategy
  • getCascadeOperations,
  • getFetchStrategy,
  • getMapping,
  • getReferencedPropertyName,
  • isCircular,
  • setAssociatedEntity,
  • setReferencedPropertyName

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • getSystemService (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now