-->
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: Ignore a bean
PostPosted: Thu Aug 18, 2005 1:36 am 
Newbie

Joined: Thu Feb 24, 2005 8:37 am
Posts: 8
Hi I have a entity mapped with annotations like this:

@Entity(name="Funcionario")
@Table(name="Funcionario")

public class Login implements Serializable {

private int id;
private String name;
private String login;
private String allusers;

.......
getters and setters of: id, name, login

But I want to implement the code in method getAllUsers(), without setter needs to implement setter method like setAllUsers(...), how can I use annotation to ignore, this bean "contract", I've got these errors:

Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property allusers in class br.com.tests.Login

_________________
---
-------------------------------------------------------------------------
Volenti Nihil Dificille


Top
 Profile  
 
 Post subject: Re: Ignore a bean
PostPosted: Thu Aug 18, 2005 1:46 am 
Newbie

Joined: Thu Feb 24, 2005 8:37 am
Posts: 8
Hi after post my question, I found the answer, just put @Transient, the answer was found here:

http://www.guj.com.br/posts/list/29386.java

abstract wrote:
Hi I have a entity mapped with annotations like this:

@Entity(name="Funcionario")
@Table(name="Funcionario")

public class Login implements Serializable {

private int id;
private String name;
private String login;
private String allusers;

.......
getters and setters of: id, name, login

But I want to implement the code in method getAllUsers(), without setter needs to implement setter method like setAllUsers(...), how can I use annotation to ignore, this bean "contract", I've got these errors:

Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property allusers in class br.com.tests.Login

_________________
---
-------------------------------------------------------------------------
Volenti Nihil Dificille


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.