<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pencils Down &#187; Hibernate ObjectDeletedException</title>
	<atom:link href="http://www.dantoomeysoftware.com/pencils-down/tag/hibernate-objectdeletedexception/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dantoomeysoftware.com/pencils-down</link>
	<description>This weblog is about my experiences in software development</description>
	<lastBuildDate>Fri, 27 Jan 2012 13:43:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hibernate ObjectDeletedException and collection handling</title>
		<link>http://www.dantoomeysoftware.com/pencils-down/2009/03/30/hibernate-objectdeletedexception-and-collection-handling/</link>
		<comments>http://www.dantoomeysoftware.com/pencils-down/2009/03/30/hibernate-objectdeletedexception-and-collection-handling/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 14:41:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hibernate ObjectDeletedException]]></category>

		<guid isPermaLink="false">http://www.dantoomeysoftware.com/pencils-down/2009/03/30/hibernate-objectdeletedexception-and-collection-handling/</guid>
		<description><![CDATA[If you are attempting to delete an object that is part of a parent object collection you are likely to have recieved an exception that looks like:
org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade &#8230;..
You must remove the entity from any parent collection first, then delete.  For example:
entity.getParent().getCollectionOfEntities().remove(entity);
dao.delete(entity);
It would be nice if Hibernate just figured [...]]]></description>
			<content:encoded><![CDATA[<p>If you are attempting to delete an object that is part of a parent object collection you are likely to have recieved an exception that looks like:</p>
<p><font size="2">org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade &#8230;..</p>
<p>You must remove the entity from any parent collection first, then delete.  For example:</p>
<p>entity.getParent().getCollectionOfEntities().remove(entity);</p>
<p>dao.delete(entity);</p>
<p>It would be nice if Hibernate just figured this out, but I don&#8217;t think that kind of oversight is coded into the toolset.</p>
<p></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dantoomeysoftware.com/pencils-down/2009/03/30/hibernate-objectdeletedexception-and-collection-handling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

