<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: org.hibernate.TransientObjectException Revisited</title>
	<atom:link href="http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/feed/" rel="self" type="application/rss+xml" />
	<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/</link>
	<description>IT happens only in IT</description>
	<lastBuildDate>Sun, 13 Nov 2011 03:16:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: ram</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-331</link>
		<dc:creator><![CDATA[ram]]></dc:creator>
		<pubDate>Fri, 19 Aug 2011 10:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-331</guid>
		<description><![CDATA[HI All,



		
			
			
		



			
		



How can update value of b  in table A with &quot;Null&quot;

Can any one help me out


thanks in advance.]]></description>
		<content:encoded><![CDATA[<p>HI All,</p>
<p>How can update value of b  in table A with &#8220;Null&#8221;</p>
<p>Can any one help me out</p>
<p>thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vikas</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-330</link>
		<dc:creator><![CDATA[Vikas]]></dc:creator>
		<pubDate>Sat, 06 Aug 2011 18:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-330</guid>
		<description><![CDATA[Hi Niraj..

Please use the below statements..if you are using annotations..and want to save both parent and child as new objects..
then inside the Bean of parent class use

@OneToOne(cascade = CascadeType.ALL)
above the child member..

it works. :)]]></description>
		<content:encoded><![CDATA[<p>Hi Niraj..</p>
<p>Please use the below statements..if you are using annotations..and want to save both parent and child as new objects..<br />
then inside the Bean of parent class use</p>
<p>@OneToOne(cascade = CascadeType.ALL)<br />
above the child member..</p>
<p>it works. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 2010 in review &#171; Techspace</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-301</link>
		<dc:creator><![CDATA[2010 in review &#171; Techspace]]></dc:creator>
		<pubDate>Tue, 04 Jan 2011 16:00:11 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-301</guid>
		<description><![CDATA[[...] org.hibernate.TransientObjectException Revisited January 200810 comments  3 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] org.hibernate.TransientObjectException Revisited January 200810 comments  3 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paras</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-165</link>
		<dc:creator><![CDATA[Paras]]></dc:creator>
		<pubDate>Wed, 19 May 2010 14:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-165</guid>
		<description><![CDATA[And if you want to keep generator as &quot;assigned&quot; then make sure you assign &quot;unique&quot; id to the object before persisting]]></description>
		<content:encoded><![CDATA[<p>And if you want to keep generator as &#8220;assigned&#8221; then make sure you assign &#8220;unique&#8221; id to the object before persisting</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-164</link>
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Wed, 19 May 2010 06:44:55 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-164</guid>
		<description><![CDATA[A bit more about this issue:

Be sure your id generator option is not set to &quot;assigned&quot;. If your have something like that:





...


Turn class to &quot;increment&quot;. If you dont, it throws this issue because the parent object has not an identifier assigned yet.

See you.]]></description>
		<content:encoded><![CDATA[<p>A bit more about this issue:</p>
<p>Be sure your id generator option is not set to &#8220;assigned&#8221;. If your have something like that:</p>
<p>&#8230;</p>
<p>Turn class to &#8220;increment&#8221;. If you dont, it throws this issue because the parent object has not an identifier assigned yet.</p>
<p>See you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paras</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-162</link>
		<dc:creator><![CDATA[Paras]]></dc:creator>
		<pubDate>Tue, 18 May 2010 14:57:40 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-162</guid>
		<description><![CDATA[Thanks Jeff for contributing. I must admit that my post is a little obsolete. I will have to update it based on current hibernate version and my knowledge on that.]]></description>
		<content:encoded><![CDATA[<p>Thanks Jeff for contributing. I must admit that my post is a little obsolete. I will have to update it based on current hibernate version and my knowledge on that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-160</link>
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Sun, 16 May 2010 11:41:31 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-160</guid>
		<description><![CDATA[I mean, a objects Set pointed by an Object.]]></description>
		<content:encoded><![CDATA[<p>I mean, a objects Set pointed by an Object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-159</link>
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Sun, 16 May 2010 11:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-159</guid>
		<description><![CDATA[Hello there,

For new objects, as Niraj one, I found a solution, but maybe its not the best one.

A a = new A();
B b = new B();
a.setB(b);

session.save(b);
session.save(a);

session.commit();

Well, the problem comes when I try to attach a Set to session; for each instance stored in the Set, I have to make a call to session.save(currentObject); these iteration is a really nasty way to resolve the problem, but works fine for me.

Maybe something better?]]></description>
		<content:encoded><![CDATA[<p>Hello there,</p>
<p>For new objects, as Niraj one, I found a solution, but maybe its not the best one.</p>
<p>A a = new A();<br />
B b = new B();<br />
a.setB(b);</p>
<p>session.save(b);<br />
session.save(a);</p>
<p>session.commit();</p>
<p>Well, the problem comes when I try to attach a Set to session; for each instance stored in the Set, I have to make a call to session.save(currentObject); these iteration is a really nasty way to resolve the problem, but works fine for me.</p>
<p>Maybe something better?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yadu</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-139</link>
		<dc:creator><![CDATA[Yadu]]></dc:creator>
		<pubDate>Mon, 26 Oct 2009 18:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-139</guid>
		<description><![CDATA[@Niraj
If A and B are new objects, solution given here is not gonna work. You may need to apply cascade for merge in mapping.]]></description>
		<content:encoded><![CDATA[<p>@Niraj<br />
If A and B are new objects, solution given here is not gonna work. You may need to apply cascade for merge in mapping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anand</title>
		<link>http://parasjain.net/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-61</link>
		<dc:creator><![CDATA[Anand]]></dc:creator>
		<pubDate>Wed, 07 Jan 2009 12:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comment-61</guid>
		<description><![CDATA[Hi paras,
could you help me
how to do this with JPA
A a = new A();
B b = session.get(B.class, new Long(1));
a.setB(b);
…..
…..

session.save(a);
TIA 
kirti]]></description>
		<content:encoded><![CDATA[<p>Hi paras,<br />
could you help me<br />
how to do this with JPA<br />
A a = new A();<br />
B b = session.get(B.class, new Long(1));<br />
a.setB(b);<br />
…..<br />
…..</p>
<p>session.save(a);<br />
TIA<br />
kirti</p>
]]></content:encoded>
	</item>
</channel>
</rss>

