-->
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.  [ 2 posts ] 
Author Message
 Post subject: Defaulting accessors to Transient
PostPosted: Wed May 02, 2007 4:48 pm 
Newbie

Joined: Tue Jun 13, 2006 9:03 am
Posts: 18
Hi,

Is there a way to default all of the methods in an Entity to transient, and then overriding those getters where I want to be persisted? For example, I have a class with one property I like persisted, the other 10 properties should not. This is what I do now:

Code:
@Entity
public class TestClass {
    public Long getId() {
    }

    @Transient
    public String getA() {
    }

    @Transient
    public String getB() {
    }

    @Transient
    public String getC() {
    }

   ...
   ...
}



As you can see, most of the getters I annotate with @Transient, which is somewhat of a pain. I hope there is a way to default them to Transient. Thanks.

-nefi


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 9:03 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
nope you cannot

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.