Results 1 to 2 of 2
  1. #1
    mukulrocks is offline Member
    Join Date
    Feb 2013
    Rep Power

    Default To delete in Hibernate using 2 Different instance of same class


    I have a Class name Project and another class Project_PK as per the standard Spring MVC structure.

    Project_PK has only Primary which is defined in and both referring to same Table

    When i was saving into the database , I was getting error of non unique object. Same error "Having Non Unique Object Exception" 2 instance of a same class.

    Which i resolved it by using merge() rather than save ().

    This worked for save but while deleting i am facing same error, can some one help me regarding this ???

    Thanks in Advance.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: To delete in Hibernate using 2 Different instance of same class

    Without some code it's going to be hard to say.
    Include the full exception text and stack trace.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Passing instance of derived class as base class
    By goatjugsoup in forum New To Java
    Replies: 7
    Last Post: 08-01-2012, 06:15 AM
  2. Problem Delete Hibernate
    By anouar2002 in forum Hibernate
    Replies: 7
    Last Post: 05-25-2012, 10:44 AM
  3. Replies: 1
    Last Post: 05-08-2012, 10:40 PM
  4. Replies: 1
    Last Post: 04-21-2012, 07:03 PM
  5. Replies: 3
    Last Post: 12-08-2010, 11:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts