<?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/"
		>
<channel>
	<title>Comments on: Flextrine Tutorial – CRUD in a simple Flex 4 address book: Creating new entities</title>
	<atom:link href="http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/</link>
	<description>Professional and reliable UK based Actionscript development</description>
	<lastBuildDate>Sun, 19 Feb 2012 15:24:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Andrea Rodríguez</title>
		<link>http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/#comment-301</link>
		<dc:creator>Andrea Rodríguez</dc:creator>
		<pubDate>Wed, 07 Sep 2011 23:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/#comment-301</guid>
		<description>You can do this:
var contactGroup:ContactGroup = new ContactGroup();
contactGroup.name =&quot;New group&quot;;
em.callRemoteMethod(&quot;getServerTime&quot;, contactGroup).ad..
And as I receive it in PHP?</description>
		<content:encoded><![CDATA[<p>You can do this:<br />
var contactGroup:ContactGroup = new ContactGroup();<br />
contactGroup.name =&#8221;New group&#8221;;<br />
em.callRemoteMethod(&#8220;getServerTime&#8221;, contactGroup).ad..<br />
And as I receive it in PHP?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: devdave</title>
		<link>http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/#comment-300</link>
		<dc:creator>devdave</dc:creator>
		<pubDate>Tue, 10 Aug 2010 13:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/#comment-300</guid>
		<description>Hey Arnaud,

You are very welcome, and thanks for your questions.

As you point out, in this particular application a failure on flush() does completely reload the database so any changes in Flextrine will indeed be lost.  However, I was keeping things as simple as possible for the sake of the tutorial and Flextrine doesn&#039;t put any demands on you to do things like this.

For example, for editing an existing entity you can use em.detach(entity) to get a copy of the entity you want to work on, and then use em.merge(entity); em.flush(); to save it.  On an error you can then reload the particular entity without having to reload the whole repository.  Alternatively you can can detach the original entity and store it somewhere in case of an error.  Note that calling em.remove() on a persisted entity that has not successfully flushed will juse cancel the persist operation, so on a failed persist you can use remove to get the repository back to its correct state.

At present there is no support for concurrency - the record will just get overwritten by whoever flushes it last.  However, support for optimistic locking will be definitely coming in later versions of Flextrine.

Cheers,

Dave</description>
		<content:encoded><![CDATA[<p>Hey Arnaud,</p>
<p>You are very welcome, and thanks for your questions.</p>
<p>As you point out, in this particular application a failure on flush() does completely reload the database so any changes in Flextrine will indeed be lost.  However, I was keeping things as simple as possible for the sake of the tutorial and Flextrine doesn&#8217;t put any demands on you to do things like this.</p>
<p>For example, for editing an existing entity you can use em.detach(entity) to get a copy of the entity you want to work on, and then use em.merge(entity); em.flush(); to save it.  On an error you can then reload the particular entity without having to reload the whole repository.  Alternatively you can can detach the original entity and store it somewhere in case of an error.  Note that calling em.remove() on a persisted entity that has not successfully flushed will juse cancel the persist operation, so on a failed persist you can use remove to get the repository back to its correct state.</p>
<p>At present there is no support for concurrency &#8211; the record will just get overwritten by whoever flushes it last.  However, support for optimistic locking will be definitely coming in later versions of Flextrine.</p>
<p>Cheers,</p>
<p>Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arnaud</title>
		<link>http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/#comment-299</link>
		<dc:creator>Arnaud</dc:creator>
		<pubDate>Tue, 10 Aug 2010 12:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/flextrine-tutorial-crud-in-a-simple-flex-4-address-book-creating-new-entities/#comment-299</guid>
		<description>Hello,

Thank you for this huge work.
2 questions on the flush :
- in case on error, when you clear the Entity Manager, this means that all user changes are lost ? - or at least those which has been saved to database before the error occurs ?)
- what about concurrency ? what happens when 2 users are working on the same record (while updating or deleting one)?

Regards</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thank you for this huge work.<br />
2 questions on the flush :<br />
- in case on error, when you clear the Entity Manager, this means that all user changes are lost ? &#8211; or at least those which has been saved to database before the error occurs ?)<br />
- what about concurrency ? what happens when 2 users are working on the same record (while updating or deleting one)?</p>
<p>Regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>

