Uploaded image for project: 'NHibernate'
  1. NHibernate
  2. NH-908

Implement read-only entities

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0.Beta3
    • Fix Version/s: 3.1.0
    • Component/s: Core
    • Labels:
      None

      Description

      Was "ICriteria/IQuery SetReadOnly"

      Right now the only way to keep specific objects from being flushed is to have two sessions, one of which does not auto-flush. Obviously this is clunky at best. Hibernate has a SetReadOnly method on ICriteria and IQuery that will keep objects returned by that query from being put into the persistence context and therefore being flushed. I'd go so far as to say that there should be some session setting that would prevent any readonly/immutable object from being flushed (as the only reason to flush them is to ensure they have not actually been changed) as well as having SetReadOnly for normally mutable objects that are being queried and used in a readonly way.

      http://forum.hibernate.org/viewtopic.php?p=2341430#2341430

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hmeh Aaron Jensen
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Who's Looking?