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 886285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:02:32+00:00 2026-05-15T13:02:32+00:00

My User entity class have several member variables (e.g. String firstName) which are persisted

  • 0

My User entity class have several member variables (e.g. String firstName) which are persisted and some transient variables (e.g. transient boolean selected) which are not.

I have used the transient variable to capture a checkbox selection, but invariably the value never gets set and procesed properly until I set another bean value along with it.

i.e. If User has firstName (mapped to a text field) and selected (mapped to a checkbox)
If I just selected the value doesn’t seem to be set on an update
If I had selected the checkbox and the firstName field, the “selected” value is captured properly

Can anyone tell me why this is happening?

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

    @Id @GeneratedValue(strategy = IDENTITY) 
    @Column(name = "id", unique = true, nullable = false, insertable = false, updatable = false) 
    private Integer id; 

    @Column(name = "first_Name") 
    private String firstName; 

    @Transient private boolean selected; // getters and setters 
} 

            <rich:dataTable value="#{users}" var="_user" style="width:auto;">
...
                <rich:column>
                    <f:facet name="header">Select</f:facet>
                    <h:selectBooleanCheckbox value="#{_user.selected}"/>
                </rich:column>
            </rich:dataTable>
  • 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-15T13:02:32+00:00Added an answer on May 15, 2026 at 1:02 pm

    We just saw a workaround to this issue. We were able to capture the value of the selected variable in our action classes (e.g. EntityQuery) but it didn’t work in the @PreUpdate methods exposed by the entity. This seems to work fine now.

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

Sidebar

Related Questions

Let's say you have a domain entity User and you want to support the
For my application there are several entity classes, User, Customer, Post, and so on
User equals untrustworthy. Never trust untrustworthy user's input. I get that. However, I am
User kokos answered the wonderful Hidden Features of C# question by mentioning the using
User-Defined Functions & Collating Sequences Full support for user-defined functions and collating sequences means
User A logs into a ticket management system to edit content on SomePage.aspx User
User click on a link button and it will direct them to a url
If user input is inserted without modification into an SQL query, then the application
What user context do SharePoint timer jobs run under? The farm account? I'm going
1) user A goes to the site, creates an account, and logs in 2)

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.