• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate update fails during test run with Spock, but succeeded in debug mode

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOLUTION
Make non Hibernate inserts with negative IDs.
________________________________________________________________________________________________
Hibernate update fails during test run with Spock, but succeeded in debug
("Evaluate code fragment" mode).

ERROR: duplicate key value violates unique constraint "category_pkey" Detail: Key (id)=(1) already exists.

Latest libraries.

What is wrong?

How fix it?


BaseSpecification

CategorySqlHibernateDAO

Category
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic