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

  • SEARCH
  • Home
  • 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 7952029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:44:20+00:00 2026-06-04T02:44:20+00:00

Dear all hibernate developers, The following hibernate hbm2java class I am using in my

  • 0

Dear all hibernate developers,
The following hibernate hbm2java class I am using in my application. I need the name field while I am getting the data from database by join two tables. (This data I have to display in a grid in UI.)
However I am getting problem when I am trying insert a record into rxJournal table.
The error is:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'name' in 'field list'  

I want to ignore/skip the ‘name’ filed While insert or update a record by using hibernate.
Following is my HBM class:

@Entity
@Table(name = "rxJournal", catalog = "Company")
public class RxJournalBean implements java.io.Serializable {

private Integer rxJournalId;
private String entryMemo;
private String name;

    ....

@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "rxJournalID", unique = true, nullable = false)
public Integer getRxJournalId() {return this.rxJournalId;}
public void setRxJournalId(Integer rxJournalId) {this.rxJournalId = rxJournalId;}

@Column(name = "EntryMemo")
public String getEntryMemo() {return this.entryMemo;}
public void setEntryMemo(String entryMemo) {this.entryMemo = entryMemo;}

public String getName() {return name;}
public void setName(String name) {this.name = name;}
}

I can create another bean by removing name field alone, however I don’t want to use redundant code. Kindly give me any suggestions.

Please ignore if I am asking any repeated question and point me to right solution.

Thanks in advance.

  • 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-06-04T02:44:23+00:00Added an answer on June 4, 2026 at 2:44 am

    If I understand correctly, you would like to have a name property in your entity, but you would like this property to be non-persistent (i.e. completely ignored by Hibernate).

    If so, that’s what @Transient is for:

    @Transient
    public String getName() {
        return name;
    }
    

    The name property will of course be null for every instance loaded by Hibernate from the database. It will only have a value if you assign one.

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

Sidebar

Related Questions

dear all..i've a textfield, it using barcode scanner for input data..after scan it shows
dear all i want to know how to submit asp.net form data using jquery
dear all..i have some data at DB. name Range bla 123x9901-123x0000 //it means range
Dear all, I have a select query that currently produces the following results: DoctorName
Dear all i am using this function to get the GMT time, i am
dear all, i'll take some data from the database. and join two tables.the code
Dear All, I am trying to parse the following HTML fragment, and I would
dear all..i have a table it looks like: Name version DDX 01 DTX 05
Dear all,I am now using a webtool http://fiddesktop.cs.northwestern.edu/mmp/scrape?url= to parse a webpage. For example,we
iphone http://sharingdream.com/phone.jpg Dear all, I'm having a strange problem with an application I'm building

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.