Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

How can we mark an entity/collection as immutable in Hibernate?

Pragya Keshap answered on February 10, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Immutable Collections#

  • How can we mark an entity/collection as immutable in Hibernate?

    0

    In Hibernate, by default an entity or collection is mutable. We can

    add, delete or update an entity/collection.

    To mark an entity/collection as immutable, we can use one of the

    following:

    @Immutable: We can use the annotation @Immutable to mark an

    entity/collection immutable.

    XML file: We can also set the property mutable=false in the XML

    file for an entity to make it immutable.

    https://www.baeldung.com/hibernate-immutable

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: java
    Link to this answer
    Share Copy Link
    Contributed on Feb 10 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.