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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:21:51+00:00 2026-06-08T07:21:51+00:00

When I execute a query to save an object in Hibernate – The query

  • 0

When I execute a query to save an object in Hibernate – The query generated is wrong – below is the hibernate generated query –

select sintranhis_.SINID, sintranhis_.SINDDT as SINDDT3_, sintranhis_.SINDES as SINDES3_, sintranhis_.SINTIME as SINTIME3_, sintranhis_.SINTNO as SINTNO3_ from ERPDSS3.SINTRAN_HISTORY  sintranhis_ where sintranhis_.SINID=?

Below is the SINTRAN_HISTORY class –

public class SottranHistory extends Persistent_Model implements java.io.Serializable {


     private SottranHistoryId id;
     private Stpmast stpmast;
     private String sotdes;
     private BigDecimal sottno;
     private Date sotddt;
     private Timestamp sottime;

    public SottranHistory() {
    }


    public SottranHistory(SottranHistoryId id, Stpmast stpmast) {
        this.id = id;
        this.stpmast = stpmast;
    }
    public SottranHistory(SottranHistoryId id, Stpmast stpmast, String sotdes, BigDecimal sottno, Date sotddt, Timestamp sottime) {
       this.id = id;
       this.stpmast = stpmast;
       this.sotdes = sotdes;
       this.sottno = sottno;
       this.sotddt = sotddt;
       this.sottime = sottime;
    }

     @EmbeddedId


    @AttributeOverrides( {
        @AttributeOverride(name="sottyp", column=@Column(name="SOTTYP", nullable=false, length=12) ), 
        @AttributeOverride(name="sotid", column=@Column(name="SOTID", nullable=false, precision=6, scale=0) ) } )
    public SottranHistoryId getId() {
        return this.id;
    }

    public void setId(SottranHistoryId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="SOTTYP", nullable=false, insertable=false, updatable=false)
    public Stpmast getStpmast() {
        return this.stpmast;
    }

    public void setStpmast(Stpmast stpmast) {
        this.stpmast = stpmast;
    }


    @Column(name="SOTDES", length=70)
    public String getSotdes() {
        return this.sotdes;
    }

    public void setSotdes(String sotdes) {
        this.sotdes = sotdes;
    }


    @Column(name="SOTTNO", precision=22, scale=0)
    public BigDecimal getSottno() {
        return this.sottno;
    }

    public void setSottno(BigDecimal sottno) {
        this.sottno = sottno;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="SOTDDT ", length=7)
    public Date getSotddt() {
        return this.sotddt;
    }

    public void setSotddt(Date sotddt) {
        this.sotddt = sotddt;
    }

    @Column(name="SOTTIME")
    public Timestamp getSottime() {
        return this.sottime;
    }

    public void setSottime(Timestamp sottime) {
        this.sottime = sottime;
    }
}

Error happens to be –

SEVERE: ORA-00904: "SINTRANHIS_"."SINID": invalid identifier

Jul 25, 2012 11:25:36 AM com.dchan.codelion.models.Persistent_Model attachDirty
SEVERE: attach failed
org.hibernate.exception.SQLGrammarException: could not retrieve snapshot: [com.dchan.codelion.models.SintranHistory#1]
  • 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-08T07:21:54+00:00Added an answer on June 8, 2026 at 7:21 am

    Finally found that there was a space in the column name. After fixing it everything is working

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

Sidebar

Related Questions

I tried to execute this query and i can´t understand what´s wrong with it.
When I execute this query: Dim Var Var = ("select max(Autonumber) from tblAutonumber") DoCmd.RunSQL
How would I execute a query equivalent to select top 10 in couch db?
I am trying to execute following query: Insert into pligg_links_temp select * from pligg_links
i want to execute the query in master database it self IF OBJECT_ID(N'DB1.dbo.T_table1', N'U')
I want to execute a query like this var result = from entry in
I'm trying to execute a query but I get an error: Unknown table alias
I'm trying to execute a query with the Tornado's database wrapper , like this
I was trying to execute a query which gets me all the info from
I am not able to execute this query getting ORA-00933: SQL command not properly

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.