-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Mutability Annotation ( goes w/ @Entity ) - examples?
PostPosted: Tue Aug 02, 2005 3:59 pm 
Newbie

Joined: Tue Aug 02, 2005 2:42 pm
Posts: 7
Okay all, I need to have an object that isn't changeable after it has been created ( unmutable ). Hibernate apparently has an EJB3 extension called mutable ( see/
http://www.hibernate.org/hib_docs/annot ... pec-entity
)

and

http://www.hibernate.org/hib_docs/annot ... l#mutable()

... But I have no idea how to use it. Eclipse gives me nothing but error's, and I can't find an example of it anywhere. I've tried things like:

@Entity
@Mutable(value=false)

and

@Entity(mutable=false)

etc...

and nothing is accepted....( I know this can be done with mapping files, but I'm trying to figure out how to do it with Annotations )


Please help :-) ( email or msn me any time if you require more info )

cheers,



Operating System:
FreeBSD 5.4

Hibernate version:
3.1alpha1

Name and version of the database you are using:
MySQL 4.1.12

Java Version:
1.5.0-p1


Top
 Profile  
 
 Post subject: I think I have a solution
PostPosted: Tue Aug 02, 2005 4:16 pm 
Newbie

Joined: Tue Aug 02, 2005 2:42 pm
Posts: 7
The following appears to work! :-D ( compiles nicely - I'll perform additional tests to confirm - absence of additional post = good result :-D. More posts here by me means :-( )

--------------------------------------

package com.sas.heartbeatmonitor.businessobjects;

import java.util.*;
import javax.persistence.*;

@Entity
@org.hibernate.annotations.Entity(mutable=false)
public class HeartBeatUpdate {...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 04, 2005 7:25 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Year, packaging is the confusing thing, I need to make the doc more clear.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.