Joined: Wed Jul 03, 2013 8:02 am Posts: 1
|
I have a POJO mapped to a view.When i query to DB which returns a list if the beans i get the following error. Query is working fine if query string("san") yields to smaller list say around 10.But the same query fails if search string is given as "a".Will the list fails if return list is big around 90+ ?
Caused by: java.sql.BatchUpdateException: ORA-01779: cannot modify a column which maps to a non key-preserved table
at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:459) at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:4133) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
query is done using below statement. return (List) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Query query = session.createQuery("from SearchedUsersBean pojo where upper(pojo.userDetails) like '%san%'"); return query.list(); }
|
|