error « Delete « JPA Q&A

1. Hibernate many-to-one annotation and error on delete

I've this bean with annotations (showing the relevant ones):

@Table(name = "Prodotti")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class Prodotto {
    int id;
    String codice;
    double prezzo;

2. cascade="all-delete-orphan" is throwing error

3. I am getting a Error deleting a row in my database

I am getting a Error [STDERR] [Fatal Error] :-1:-1: Premature end of file. when i am deleting a row in my mysql database. Any one have any ideas? Code: This is the parent ...

4. Getting error in delete

Hi, When i am trying to delete a table using Object, i am getting error if it is reffering some other table. My requirement is if a object is refering some other table then it should not delete ... For Example: //Here BeanClass is a bean class which is mapped to a table BeanClass Obj=null; //Here pk id primary key of ...

5. Error when switching to 2.1 final - "all-delete-orphan&

Hello! I've been using Hibernate 2.1 b5 for quite awhile with no major problems. Last week, I switched to 2.1 final and got this error when trying to save an entity: You may not dereference a collection with cascade="all-delete-orphan" I switched back to b5 and the error disappeared. The mapping file looks like this:

6. delete, cascade and error on quering a collection

Hi. I Have 3 objects: A,B,C A has a set of B C has a set of B I put cascade="all" on A set of B, so that when I delete one A, all of the B objects will be deleted too. all works ok. The problem begins when object C try to query his collection of B, and one of ...

7. Unable to delete element from Set, but No ERROR messages??

Author Message ricsid Post subject: Unable to delete element from Set, but No ERROR messages?? Posted: Tue Aug 24, 2004 1:26 am Beginner Joined: Wed Feb 25, 2004 5:54 am Posts: 30 Hibernate version: 2.1.2 Mapping documents: ...

8. Delete Object error

[b]Hibernate version:2.1.4 I am trying do delete the rows . When I doing this I am getting this error oracle.jdbc.dbaccess.DBData.clearItemProblem with checked-in Statement, discarding. java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem( at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem( at oracle.jdbc.driver.OraclePreparedStatement.clearParameters( This is code snippet tx = session.beginTransaction(); session.delete("from com.birch.vitria.blq.persistentobjects.LoopQualResponse lqr where lqr.qualificationRequest.qualificationRequestId=" +440); commitTransaction. Any help would be greatly apppreciated. Nandhu

9. session.delete error

Hibernate version: 2.1.6 Mapping documents: net.sf.hibernate.dialect.Oracle9Dialect jdbc/Swift_SIT_8i true 0 true ...

10. update and delete completes with no errors when it should

well, i'm using version 2.1.8, too and i'm getting an exception if i'm updating a row which doesn't exist .. Set your log-level to "debug" (in the and take a look what hibernate logs ... Is it possible, that you have a bad exception-handling? E.g. a "try ... catch" which ignores the Hibernate-Exception? HTH curio

11. error: 2 open sessions on delete.

View unanswered posts | View active topics Board index Hibernate & Java Persistence Hibernate Users All times are UTC - 5 hours [ DST ] error: 2 open sessions on delete. Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message LORDs_diakonos Post subject: error: ...

12. Error running bulk delete

Need help with Hibernate? Read this first: ... AskForHelp Hibernate version: 3.0.5 Mapping documents: Code: ...

14. Delete through a view causes SQL Server error

I have a class that is mapped to a view. I do this because some of the attributes of the class are denormalized from other tables. When I attempt to delete an instance of my class, I get the following SQL Server error: View or function 'MooView' is not updatable because the modification affects multiple base tables Question: Is it possible ...

15. Error while deleting collection

Hi, I have a parent child relation ship with one-to-many. I load the parent along with set of children, I have to update this set. I tried various options but every time I get the error: 8:45:58,980 ERROR [LogInterceptor] EJBException in method: public abstract,java.lang.String,java.lang.String, throws java.rmi.RemoteException, causedBy: null Inner Exception :org.hibernate.exception.ConstraintViolationException:could not delete collection: [] at at ...

16. Error on Deleting Records

Hi I am trying to delete records from the db. First of all I am using find(String query) method to fetch the records from the db and then i am using hibernateTemplate.delete(Object obj) but when i do this , its throwing the following exception:- Code: Caused by: org.hibernate.MappingException: Unknown entity: [Ljava.lang.Object; at org.hibernate.impl.SessionFactoryImpl.getEntityPersister( ...

17. HQL Delete Error

18. Error while deleting a record

String sql = "delete from "+ tableName +" where "+ column +" = "+id; Query query = sess.createSQLQuery(sql); int row = query.executeUpdate();

19. Foreign Key error when deleting one side of a M-M assn.

Hi folks, I'm using Hibernate 3.3.2.GA Entity Manager with JPA. My database is MySQL 5.0. I have an association between a Pricelist and a Product called ProductPrice. A straight-up Many-to-Many association wouldn't have given us the opportunity to add properties at the association point. (that I'm aware of) So, we have instead defined the two One-to-Many relationships. Here are some excerpts ...