Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4084592
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:27:34+00:00 2026-05-20T18:27:34+00:00

I´ve got a bean containing some fields, and two of them are not intended

  • 0

I´ve got a bean containing some fields, and two of them are not intended to be mapped by hibernate (errorStatus and operationResultMessage). How do I tell Hibernate (via annotations) that I don´t want to map those fields?

*The mapped table in the beans does not have the fields: errorStatus and operationResultMessage

Thanks in advance.

Code right bellow:

** Gettters and Setters ommited!

@Entity
@Table(name = "users")
public class AccountBean implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;

@Column(name = "name")
private String userName;

@Column(name = "email")
private String email;

@Column(name = "login")
private String login;

@Column(name = "password")
private String password;

private Boolean errorStatus;

private String operationResultMessage;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:27:35+00:00Added an answer on May 20, 2026 at 6:27 pm

    Use the @Transient annotation.


    /* snip... */
    
    @Transient
    private Boolean errorStatus;
    
    @Transient
    private String operationResultMessage;
    

    Obviously, if you’re annotating the getters/setters rather than the fields, that’s where the @Transient annotation would go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got two instances of a SessionScoped CDI bean for the same session. I
I've got a bean (id=myBean) defined in e.g. core.xml. myBean is NOT abstract, and
I've got a jsf 1.2 form with two buttons and several input fields. The
I got 2 projects. A plugin project containing some components (POJOs) and a fragment
I've got some code that looks similar to this: <h:outputLink value=#{bean.url} /> But the
I've got a singleton bean that has a method that creates instances of a
I've got another problem (which might not be an issue in terms of coding
I've got problems starting my WAR application on a local JBoss. After two other
I've got a singleton Spring bean that creates a couple of tasks ( java.util.concurrent.Callable
I've got a Stateful Session bean where I create a object (in this case

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.