Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-7446

READ and READ-WRITE transactions are applied by service name

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 7.2.x
    • Component/s: Core Infrastructure
    • Labels:
      None

      Description

      There are two kinds of database transaction precipitated by your Service Builder
      project's service methods: READ-WRITE and plain old READ. Specific service
      method name prefixes determine the transaction type applied to the method.
      Service methods prefixed with any of these words precipitate a database READ:

      • `dynamicQuery`
      • `fetch`
      • `get`
      • `has`
      • `is`
      • `load`
      • `reindex`
      • `search`

      Otherwise, a READ-WRITE transaction is made. Methods that persist data (i.e.,
      add, update, or delete data) must execute in READ-WRITE transactions. Therefore,
      DO NOT use the words above to prefix names of data persistence methods.

        Attachments

          Activity

            People

            • Assignee:
              richard.sezov Rich Sezov
              Reporter:
              james.hinkey James Hinkey
              Subject Matter Expert:
              Shuyang Zhou
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.2.x