<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>David Cramer's Blog - Latest Comments in An Identity Mapper in Django (formerly Django Singletons)</title><link>http://davidcramer.disqus.com/</link><description></description><atom:link href="https://davidcramer.disqus.com/singletons_in_django/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 02 Dec 2008 18:47:29 -0000</lastBuildDate><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4136834</link><description>&lt;p&gt;This sounds wicked! Thanks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom.</dc:creator><pubDate>Tue, 02 Dec 2008 18:47:29 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4134783</link><description>&lt;p&gt;Very useful info.. Thanks..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dailycad</dc:creator><pubDate>Tue, 02 Dec 2008 16:45:07 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4133145</link><description>&lt;p&gt;Ah if you are correct then I will be renaming the project. I haven't done much research (in terminology), but had assumed it was correct via the ticket on Django.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Cramer</dc:creator><pubDate>Tue, 02 Dec 2008 15:21:50 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4132911</link><description>&lt;p&gt;I think calling this Singletons is quite misleading. The Singleton Pattern is used to enforce a single instance of a class; not a single instance of a business entity. Identity Map is the correct naming but note Fowler's emphasis on using one Identity Map per transaction.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steingrim</dc:creator><pubDate>Tue, 02 Dec 2008 15:10:37 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4132227</link><description>&lt;p&gt;Personally, I plan to use it throughout the codebase to prevent some data issues. The one area this doesn't affect right now (due to complications we had with it at Curse) is serialization. It will ignore the instance caching when you unserialize objects (such as from the cache).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Cramer</dc:creator><pubDate>Tue, 02 Dec 2008 14:34:51 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4132169</link><description>&lt;p&gt;I think per query is a bit out of scope for what I want to achieve. Doing this would require the queryset/manager to be aware (to some extent) of the singleton model. This wouldn't quite achieve the same performance benefit.&lt;/p&gt;&lt;p&gt;The biggest thing about this, while it IS an obvious performance boost, its not the sole intention of the project. Having unique instances of an object in memory can solve a lot of other issues as well.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Cramer</dc:creator><pubDate>Tue, 02 Dec 2008 14:31:28 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4128766</link><description>&lt;p&gt;^^ My questions exactly&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sam Toriel</dc:creator><pubDate>Tue, 02 Dec 2008 11:45:27 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4128713</link><description>&lt;p&gt;Could there be a way to enable this per query?  In your example, it's obvious that creating only one instance per category is optimal, but are there cases where it may not be what you want?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rob Hudson</dc:creator><pubDate>Tue, 02 Dec 2008 11:42:49 -0000</pubDate></item><item><title>Re: An Identity Mapper in Django (formerly Django Singletons)</title><link>http://cramer.io//375/singletons-in-django.html#comment-4126524</link><description>&lt;p&gt;So, two questions.&lt;/p&gt;&lt;p&gt;1.  Per your explanation, it wasn't strictly necessary to define Article as a SingleModel, correct?&lt;/p&gt;&lt;p&gt;2.  Given the obvious benefits, are there any reasons not to use this class for all models?  Am I missing something crucial here?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom Davis</dc:creator><pubDate>Tue, 02 Dec 2008 09:21:24 -0000</pubDate></item></channel></rss>