-->
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.  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Update query gets fired while searching
PostPosted: Wed Nov 24, 2010 6:12 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
10/11/24 14:56:48 org.hibernate.exception.SQLGrammarException: could not update: [com.netechinc.forms.TenderForm.QuotationDetailsSearchForm#645] //Class name
10/11/24 14:56:48 at org.hibernate.JDBCException.<init>(JDBCException.java:49)
10/11/24 14:56:48 at org.hibernate.exception.SQLGrammarException.<init>(SQLGrammarException.java:54)
10/11/24 14:56:48 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
10/11/24 14:56:48 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
10/11/24 14:56:48 at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2573)
10/11/24 14:56:48 at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2455)
10/11/24 14:56:48 at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2755)
10/11/24 14:56:48 at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:114)
10/11/24 14:56:48 at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268)
10/11/24 14:56:48 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:260)
10/11/24 14:56:48 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:180)
10/11/24 14:56:48 at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
10/11/24 14:56:48 at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
10/11/24 14:56:48 at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
10/11/24 14:56:48 at Hibernate.DBQueries.search(DBQueries.java:339)
10/11/24 14:56:48 at com.netechinc.actions.TenderAction.TenderAction.execute(TenderAction.java:227)
10/11/24 14:56:48 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
10/11/24 14:56:48 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
10/11/24 14:56:48 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
10/11/24 14:56:48 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:434)
10/11/24 14:56:48 at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
10/11/24 14:56:48 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
10/11/24 14:56:48 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
10/11/24 14:56:48 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
10/11/24 14:56:48 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
10/11/24 14:56:48 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
10/11/24 14:56:48 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
10/11/24 14:56:48 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
10/11/24 14:56:48 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
10/11/24 14:56:48 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
10/11/24 14:56:48 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
10/11/24 14:56:48 at java.lang.Thread.run(Thread.java:595)
10/11/24 14:56:48 Caused by: java.sql.SQLException: ORA-01776: cannot modify more than one base table through a join view

10/11/24 14:56:48 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
10/11/24 14:56:48 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
10/11/24 14:56:48 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
10/11/24 14:56:48 at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
10/11/24 14:56:48 at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
10/11/24 14:56:48 at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
10/11/24 14:56:48 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
10/11/24 14:56:48 at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
10/11/24 14:56:48 at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
10/11/24 14:56:48 at oracle.oc4j.sql.proxy.PreparedStatementBCELProxy.executeUpdate(PreparedStatementBCELProxy.java:37)
10/11/24 14:56:48 at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2555)


When i m trying to search results from database using

Criteria crit = session.createCriteria(form.getClass());
searchresult = crit.list();

On session.flush() above exception is thrown.

Because it is generating update query on session.flush as follows


update
(
select
a.tender_no,
b.tender_id,
TO_CHAR(a.createdate,
'DD/MM/YYYY') as createdate,
b.work_no,
b.work_id,
b.type,
b.status,
b.emd as emd_amount
from
tender a,
tender_details b
where
a.pk_tender_id =b.tender_id
)
set
tender_id=?,
tender_no=?,
emd_amount=?,
createdate=?,
work_no=?,
type=?,
status=?
where
work_id=?

Why hibernate is generating update query for session.createCriteria???

Thanks in advance.

Chirag

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Tue Nov 30, 2010 2:37 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Can any1 help why is this happening???



Thanks,
Chirag

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:04 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Still facing the problem?? Any1 to help??

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:11 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
hi, there are two possibilities.
1) Hibernate will automatically flush the session if it is having dirty objects in memory which might affect your query.
Example, you change the username of a Person, didn't flush or commit, then search for all Person(s), it will flush before the query to make sure the results are consistent.
2) Your entities are being changed by your own query. For example you are using a setter in your entity to change another field, that's very bad practice as it will trigger the "dirty object" as mentioned in 1).

Also besides wondering why it is flushing, you should find out what the SQLGrammarException is.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:15 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Most surprising thing is that i am facing this problem only when i am trying to search data in which <join table="abstract"> tag is used in mapping file.

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:20 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
And one more thing is my search query gives me correct results but after search is generated on flush that update query also fires.

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:22 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
could you make a unit test of this?
Is the flush manually invoked, and why are you using flush?

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:28 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Mapping code :
Code:
<class name="com.netechinc.forms.TenderForm.QuotationDetailsSearchForm" table="works_info">
       <id name="pk_work_id"> 
       </id>
        <property name="work_name" column="work_name" type="java.lang.String"/>
            <property name="constituency" column="constituency" type="java.lang.String"/>
            <property name="vill_panch_name" column="vill_panch_name" type="java.lang.String"/>
             <property name="office" column="office" type="java.lang.String"/>
             
        <join table="tender_details">             
            <subselect>
            select a.tender_no,b.tender_id,TO_CHAR(a.createdate, 'DD/MM/YYYY') as tender_date,b.work_no, b.work_id,b.type,b.status,b.emd as emd_amount from tender a,tender_details b where a.pk_tender_id =b.tender_id
            <!--select a.tender_no,b.tender_id,TO_CHAR(a.createdate, 'DD/MM/YYYY') as createdate,b.work_no, b.work_id,b.type,b.status,b.emd as emd_amount from tender a,tender_details b where a.pk_tender_id =b.tender_id and a.last_submission_day >= SYSDATE             -->
            </subselect>
            <key column="work_id" />
            <property name="work_id" column="work_id" type="java.lang.String" insert="false" update="false"/>
            <property name="tender_id" column="tender_id" type="java.lang.String"/>       
             <property name="tender_no" column="tender_no" type="java.lang.String"/>       
             <property name="emd_amount" column="emd_amount" type="java.lang.String"/> 
            <property name="tender_date" column="tender_date" type="java.lang.String"/>
            <property name="work_no" column="work_no" type="java.lang.String"/>
            <property name="type" column="type" type="java.lang.String"/>
            <property name="status" column="status" type="java.lang.String"/>
        </join>
       
        <join table="ABSTRACT"  >             
       
        <subselect>
            select a.work_id,a.total_amount,a.pk_abstract_id from ABSTRACT a where a.work_id not in (select work_id from tender_award)
        </subselect>
        <key column="work_id" />
         <property name="est_amount" column="total_amount" type="java.lang.String"/>
         <property name="pk_abstract_id" column="pk_abstract_id" type="java.lang.String"/>
        </join>
</class>



Entity Class :
Code:
import java.text.DecimalFormat;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts.validator.ValidatorForm;

public class QuotationDetailsSearchForm extends ValidatorForm{
    DecimalFormat Amount = new DecimalFormat("0.00");
    public QuotationDetailsSearchForm() {
    }
   
    private String pk_work_id=null;
    private String pk_ten_det_id=null;
    private String tender_id =null;
    private String tender_no =null;
    private String  work_name  =null;       
    private String  work_id=null;
    private String work_no    =null;     
     private String vill_panch_name  =null;
     private String constituency=null; 
     private String tender_date_from =null;
     private String tender_date_to  =null;
     private String tender_date  =null;   
     private String est_amount  =null;     
     private String prnView =null;         
    private String item_sr_no =null; 
 
    private String type=null;
    private String office =null;
    private String emd_amount=null;
    private String pk_abstract_id=null;
    private String pk_abs_det_id = null;
   
   
    private String primaryKey = null;
    private String tableName =  null;
    private String action =null;
    private String dateFields =null;
    private String status=null;
   
    public void setWork_name(String work_name) {
        this.work_name = work_name;
    }

    public String getWork_name() {
        return work_name;
    }

    public void setWork_no(String work_no) {
        this.work_no = work_no;
    }

    public String getWork_no() {
        return work_no;
    }

    public void setVill_panch_name(String vill_panch_name) {
        this.vill_panch_name = vill_panch_name;
    }

    public String getVill_panch_name() {
        return vill_panch_name;
    }

   
    public void setTender_date_from(String tender_date_from) {
        this.tender_date_from = tender_date_from;
    }

    public String getTender_date_from() {
        return tender_date_from;
    }

    public void setTender_date_to(String tender_date_to) {
        this.tender_date_to = tender_date_to;
    }

    public String getTender_date_to() {
        return tender_date_to;
    }

    public void setTender_date(String tender_date) {
        this.tender_date = tender_date;
    }

    public String getTender_date() {
        return tender_date;
    }

    public void setEst_amount(String est_amount) {
        if (est_amount != null && !est_amount.equals(""))
                   this.est_amount = Amount.format(Double.parseDouble(est_amount));
               else
        this.est_amount = est_amount;
    }

    public String getEst_amount() {
        return est_amount;
    }

    public void setPrnView(String prnView) {
        this.prnView = prnView;
    }

    public String getPrnView() {
        return prnView;
    }

 

    public void setPrimaryKey(String primaryKey) {
        this.primaryKey = primaryKey;
    }

    public String getPrimaryKey() {
        return primaryKey;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableName() {
        return tableName;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getAction() {
        return action;
    }

    public void setTender_id(String tender_id) {
        this.tender_id = tender_id;
    }

    public String getTender_id() {
        return tender_id;
    }

    public void setPk_ten_det_id(String pk_ten_det_id) {
        this.pk_ten_det_id = pk_ten_det_id;
    }

    public String getPk_ten_det_id() {
        return pk_ten_det_id;
    }

    public void setWork_id(String work_id) {
        this.work_id = work_id;
    }

    public String getWork_id() {
        return work_id;
    }

    public void setTender_no(String tender_no) {
        this.tender_no = tender_no;
    }

    public String getTender_no() {
        return tender_no;
    }

    public void setConstituency(String constituency) {
        this.constituency = constituency;
    }

    public String getConstituency() {
        return constituency;
    }

    public void setPk_work_id(String pk_work_id) {
        this.pk_work_id = pk_work_id;
    }

    public String getPk_work_id() {
        return pk_work_id;
    }

    public void setOffice(String office) {
        this.office = office;
    }

    public String getOffice() {
        return office;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }


    public void setDateFields(String dateFields) {
        this.dateFields = dateFields;
    }

    public String getDateFields() {
        return dateFields;
    }

    public void setEmd_amount(String emd_amount) {
        if (emd_amount != null && !emd_amount.equals(""))
                   this.emd_amount = Amount.format(Double.parseDouble(emd_amount));
               else
        this.emd_amount = emd_amount;
    }

    public String getEmd_amount() {
        return emd_amount;
    }

    public void setPk_abstract_id(String pk_abstract_id) {
        this.pk_abstract_id = pk_abstract_id;
    }

    public String getPk_abstract_id() {
        return pk_abstract_id;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setPk_abs_det_id(String pk_abs_det_id) {
        this.pk_abs_det_id = pk_abs_det_id;
    }

    public String getPk_abs_det_id() {
        return pk_abs_det_id;
    }

    public void setItem_sr_no(String item_sr_no) {
        this.item_sr_no = item_sr_no;
    }

    public String getItem_sr_no() {
        return item_sr_no;
    }
}


Business Class:
Code:
public List search(SessionFactory sessionFactory, ActionForm form) {
        List searchresult = null;

        try {
            AlterSession(session);
            GeneralUtils webutil = new GeneralUtils();
            HashMap temp = (HashMap)PropertyUtils.describe(form);
            HashMap params = webutil.validateformMap(temp);
            session = sessionFactory.openSession();
            AlterSession(session);
            Criteria crit = session.createCriteria(form.getClass());

            traceLogger.info("Search Result HashMap ==>" + params);

            //First Getting Date Field
            String dateFields = getS(params, "dateFields");

            String fieldName = null;
            String[] dateList = null;
            String startTag = "_from";
            String endTag = "_to";
            String startDate = null;
            String endDate = null;

            params.remove("tableName");
            params.remove("action");


            if (dateFields != null) {
                dateList = dateFields.split(",");
                for (int i = 0; i < dateList.length; i++) {
                    fieldName = dateList[i];
                    String tempFieldname = fieldName;
                    traceLogger.info("tempFieldname  " + tempFieldname);
                    startDate = getS(params, tempFieldname + startTag);
                    endDate = getS(params, tempFieldname + endTag);

                    traceLogger.info("startDate  " + startDate);
                    traceLogger.info("endDate  " + endDate);

                    params.remove(tempFieldname + startTag);
                    params.remove(tempFieldname + endTag);

                    if (startDate != null && endDate != null) {
                        if (startDate.length() == 10 &&
                            endDate.length() == 10) {

                            if(tempFieldname!=null && !tempFieldname.equalsIgnoreCase("") && tempFieldname.equalsIgnoreCase("createdate")){
                                crit.add(Restrictions.between(tempFieldname, startDate, endDate));
                            }
                            else{
                                //crit.add(Expression.sql("TO_DATE("+tempFieldname+",'DD/MM/YYYY') between '"+startDate+"' and '"+endDate+"'"));
                                crit.add(Restrictions.sqlRestriction("TO_DATE("+tempFieldname+",'DD/MM/YYYY') between '"+startDate+"' and '"+endDate+"'"));
                            }


                        }
                    }
                }


            }
            params.remove("dateFields");


            // Get Order By Clause
            String orderBy = "";
            if (getS(params, "orderBy") != null) {
                orderBy = getS(params, "orderBy");
                crit.addOrder(Order.asc(orderBy));
            }
            params.remove("orderBy");
            params.remove("selTender");
            params.remove("primaryKey");
            params.remove("ad_details");


            Iterator columns = params.keySet().iterator();
            String columnName, value;
            while (columns.hasNext()) {
                columnName = (String)columns.next();
                traceLogger.info("Column Name xxx ==>" + columnName);

                // System.out.println(columnName);
                if (getS(params, columnName) != null &&
                    (getS(params, columnName)).length() > 0) {

                    traceLogger.info("Column Name ==>" + columnName);

                    value = getS(params, columnName);
                    traceLogger.info("value ==>" + value);
                    if (value != null) {
                        if (value.indexOf("'") != -1)
                            value = value.replaceAll("'", "'||chr(39)||'");
                    }

                    if (value.substring(0, 1).equals("!")) {
                        crit.add(Restrictions.ne(columnName,
                                                 value.substring(1, value.length())));
                        //fieldClause += "("+columnName +" != '"+ value.substring(1, value.length()) + "')";
                    }

                    else if (value.substring(0, 1).equals(">")) {
                        crit.add(Restrictions.gt(columnName,
                                                 value.substring(1, value.length())));
                        //fieldClause += "("+columnName +" > '"+value.substring(1,value.length()) + "')";
                    } else if (value.substring(0, 1).equals("<")) {
                        crit.add(Restrictions.le(columnName,
                                                 value.substring(1, value.length())));
                        //fieldClause += "("+columnName +" < '"+value.substring(1,value.length()) + "')";
                    } else if (value.indexOf("%") >= 0) {

                        crit.add(Restrictions.ilike(columnName, value));
                    } else {
                        crit.add(Restrictions.eq(columnName, value));
                    }
                }
            }
            traceLogger.info("Search Result HashMap 2 ==>" + params);
            // Get Order By Clause

            searchresult = crit.list();

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {

                try {
                    session.flush();
                } catch (Exception e) {
                    e.printStackTrace();
                }

                session.close();

            } catch (JDBCException e) {
                e.printStackTrace();
            }

        } //Finally
        return searchresult;
    } //End of search

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:32 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
public void setEst_amount(String est_amount) {
if (est_amount != null && !est_amount.equals(""))
this.est_amount = Amount.format(Double.parseDouble(est_amount));
else
this.est_amount = est_amount;
}

As I said above, you're changing your data in a setter (twice, there is a second one below).
Hibernate detects the entity is "dirty" and needs to flush to database, you should really not have code like this.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:34 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Quote:
As I said above, you're changing your data in a setter (twice, there is a second one below).
Hibernate detects the entity is "dirty" and needs to flush to database, you should really not have code like this.



But i have done it in all my entity class.It doesn't give the same error every time.

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:39 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
still it's creating a hell of issues.
It might create trouble in just some corner cases because it depends on your exact data and String format used in each line of your db.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:40 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
A way better pattern is to cleanup your database with a mass update statement, and then use Bean Validator to make sure only data in your preferred format is stored.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:43 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Code:
It might create trouble in just some corner cases because it depends on your exact data and String format used in each line of your db.


If this is the case i cant make changes to my all entity classses.Is there any alternative solution to this issue?? I cant make hibernate know what exact data and String format is used in each line of my db??

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 6:49 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Quote:
A way better pattern is to cleanup your database with a mass update statement, and then use Bean Validator to make sure only data in your preferred format is stored.



But entity class i showed you is to retrieve data from db rather than inserting data.So you want me to save data initially in format i want so that while retrieval it wont create a problem.Is this what you want to say right??

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: Update query gets fired while searching
PostPosted: Thu Dec 23, 2010 7:30 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
I have removed that setter method from entity class and it is working fine and no update query is fired.But it is strange that it is happening for few entity classes only.Can you give some idea why it is happening and what are the alternative solutions rather than changing all my entity classes.


Thanks for your help Sanne.


Chirag

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next

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.