In Hibernate what all is required to make an entity read-only?

Solution Verified - Updated -

Issue

  • I want to set an ORM to read-only. I'm using the two annotations below on each persistent class. Is this sufficient and is there anything else that must be set?

    @org.hibernate.annotations.Entity(mutable=false)
    @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
    

Environment

  • JBoss Hibernate 3.2.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content