File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient " Watch "org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient " New topic
Author

org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient

Shinu Pil
Greenhorn

Joined: Sep 02, 2005
Posts: 9
Hi all,
when i try to insert some data to the table abc

i have another table device



my mapping file of abc i added


when i try to insert into db using hibernate template.save i got
rg.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: com.tel.it.model.Employee; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: com.model.Employee
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:654)
org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793)
org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.

please help is ineed to mention all dependency of employee in abc mapping
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

This posts talks about the transient exception: http://uaihebert.com/?p=1674


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient