<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title></title>
		<link>http://www.silverstripe.org/forums/rss</link>
		<atom:link href="http://www.silverstripe.org/forums/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Re: Listing 2 DataObjectSets</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19186#post311767</link>
			<description>&lt;p&gt;What you are doing should work - at least within your getRewardRedemptions function itself. Did you do a var_dump there, or a foreach echo?&lt;/p&gt;&lt;p&gt;What does your template look like? (the bit that handles getRewardRedemptions)?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Listing 2 DataObjectSets &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19186#post311767&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19186&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sun, 12 Feb 2012 01:06:12 +1300</pubDate>
			<dc:creator>martimiz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19186#post311767</guid>
		</item>
		
		<item>
			<title>Listing 2 DataObjectSets</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19186</link>
			<description>&lt;p&gt;Howdy,  I have created 2 DataObjects Rewards and Redemptions. I would like to display them on a single list sorted by their created field. &lt;/p&gt;&lt;p&gt;Here is the code doing the work;&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;function getRewardRedemptions() {&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;$doSet = new DataObjectSet();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if($Rewards = DataObject::get('Rewards',&quot;MemberID={$this-&amp;gt;Member-&amp;gt;ID}&quot;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$doSet-&amp;gt;merge($Rewards);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if($this-&amp;gt;Member &amp;amp;&amp;amp; $Redemptions = DataObject::get('Redemptions',&quot;MemberID={$this-&amp;gt;Member-&amp;gt;ID}&quot;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$doSet-&amp;gt;merge($Redemptions);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;$doSet-&amp;gt;Sort('Created');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $doSet;&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;It all works a-ok with one small hick up the list is grouping the Objects. So all the rewards and the redemptions are sitting together. What I would like to happen is the rewards and redemptions to be intertwinned. &lt;/p&gt;&lt;p&gt;I'm pretty certain there is one little tweak I need to make so it all falls into place.&lt;/p&gt;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Listing 2 DataObjectSets &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19186&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19186&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 11 Feb 2012 19:52:10 +1300</pubDate>
			<dc:creator>eceers</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19186</guid>
		</item>
		
		<item>
			<title>Re: Make DOs searchable (Fulltextsearch)</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19177#post311746</link>
			<description>&lt;p&gt;Hi!&lt;/p&gt;&lt;p&gt;There are some threads elsewhere, try searching a bit more, but it’s a difficult subject. I have only managed to make it work, and with some limitations, thanks to the custom_search module:&lt;br /&gt;&lt;a href=&quot;http://www.silverstripe.org/form-questions/show/18547&quot; rel=&quot;nofollow&quot;&gt;http://www.silverstripe.org/form-questions/show/18547&lt;/a&gt;&lt;/p&gt;&lt;p&gt;A promising new module has been recently published, but I haven’t used it yet:&lt;br /&gt;&lt;a href=&quot;http://www.silverstripe.org/all-other-modules/show/19083&quot; rel=&quot;nofollow&quot;&gt;http://www.silverstripe.org/all-other-modules/show/19083&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Hope it helps,&lt;br /&gt;Juan&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Make DOs searchable (Fulltextsearch) &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19177#post311746&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19177&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 10 Feb 2012 21:46:42 +1300</pubDate>
			<dc:creator>Juanitou</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19177#post311746</guid>
		</item>
		
		<item>
			<title>Make DOs searchable (Fulltextsearch)</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19177</link>
			<description>&lt;p&gt;Hi everybody,&lt;/p&gt;&lt;p&gt;I got two different dataobjects (projects, staff) not related to each other. Both got titles and decriptions.  So i wanna make these titles and desc. searchable by the silverstripe buildin fulltextsearch. How to connetc the DO and the search.  Despite of searching the forum i found no solution.  Is there a tutorial or a nice snippet to get this done? &lt;/p&gt;&lt;p&gt;Thanks for help. Pipifix&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Make DOs searchable (Fulltextsearch) &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19177&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19177&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 10 Feb 2012 07:59:46 +1300</pubDate>
			<dc:creator>Pipifix</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19177</guid>
		</item>
		
		<item>
			<title>Re: Unit Test for DataObjectDecorator</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19161#post311716</link>
			<description>&lt;p&gt;As I said, they're applied transparently so if you create a function Foo() calling Foo() on a member class would work.&lt;/p&gt;&lt;p&gt;//&lt;br /&gt;class MemberDecorator extends DataObjectDecorator {&lt;br /&gt;function Foo() { return &quot;hi&quot;; }&lt;br /&gt;}&lt;br /&gt;// &lt;br /&gt;DataObject::add_extension('Member', 'MemberDecorator');&lt;br /&gt;//&lt;/p&gt;&lt;p&gt;$member = Member::currentUser();&lt;br /&gt;echo $member-&amp;gt;Foo(); // &quot;hi&quot;;&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Unit Test for DataObjectDecorator &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19161#post311716&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19161&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 09 Feb 2012 23:09:20 +1300</pubDate>
			<dc:creator>Willr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19161#post311716</guid>
		</item>
		
		<item>
			<title>Re: Unit Test for DataObjectDecorator</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19161#post311695</link>
			<description>&lt;p&gt;But how can I call a Method on the Decorator?&lt;/p&gt;&lt;p&gt;If i have a MemberDecorator-&amp;gt;doSomethingImportant() function, how do i call this function thru the Member class as i would during normal developement?&lt;/p&gt;&lt;p&gt;Can you make a little example, because i realy don't get it. (Sometimes i'm a little dumb...)&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Unit Test for DataObjectDecorator &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19161#post311695&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19161&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 09 Feb 2012 08:44:39 +1300</pubDate>
			<dc:creator>juergr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19161#post311695</guid>
		</item>
		
		<item>
			<title>Re: Unit Test for DataObjectDecorator</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19161#post311680</link>
			<description>&lt;p&gt;&lt;em&gt;Is there a way to tell the Saphire test that the Member Object is Decorated with another Object?&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Decorators are applied transparently so you have to test again member directly (ensuring of course your decorator is added). You can see what extensions are applied to what object using the methods on object - &lt;a href=&quot;http://api.silverstripe.org/2.4/sapphire/core/Object.html&quot; rel=&quot;nofollow&quot;&gt;http://api.silverstripe.org/2.4/sapphire/core/Object.html&lt;/a&gt;.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Unit Test for DataObjectDecorator &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19161#post311680&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19161&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 08 Feb 2012 21:12:45 +1300</pubDate>
			<dc:creator>Willr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19161#post311680</guid>
		</item>
		
		<item>
			<title>Unit Test for DataObjectDecorator</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19161</link>
			<description>&lt;p&gt;How do I write Unit Tests for DataObjectDecorators? I have a MemberDecorator which adds a lot of functionality and information to the member object and now i want to test these functions.&lt;/p&gt;&lt;p&gt;But when i try to call a function of the MemberDecorator i get a error &quot;undefined method&quot; on member.&lt;/p&gt;&lt;p&gt;Is there a way to tell the Saphire test that the Member Object is Decorated with another Object?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Unit Test for DataObjectDecorator &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19161&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19161&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 08 Feb 2012 09:04:03 +1300</pubDate>
			<dc:creator>juergr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19161</guid>
		</item>
		
		<item>
			<title>Site search using page tags</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19134</link>
			<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I have been trying to put together a search system that will search for pages that have been given certain tags.&lt;/p&gt;&lt;p&gt;The basic principle is that I have a type of page that can have any number of tags applied to it. The tags are controlled through modelAdmin so we build up a list of tags that could be applied to any of the tagable page types. What I am trying to achieve is the ability to search for pages which match all of the selected tags.&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;p&gt;We have multiple pages for cars which have tags based on the car they are describing:&lt;/p&gt;&lt;p&gt;car page 1 tags: Red, 4 wheels, Soft top&lt;/p&gt;&lt;p&gt;car page 2 tags: Blue, 4 wheels, soft top, fast&lt;/p&gt;&lt;p&gt;car page 3 tags: Blue, 4 wheels, slow&lt;/p&gt;&lt;p&gt;on our search page we would have a list of all of the unique tags as checkcboxes so that the user could find a car that matches their needs:&lt;/p&gt;&lt;p&gt;tags:&lt;br /&gt;Red,&lt;br /&gt;Blue,&lt;br /&gt;4 wheels,&lt;br /&gt;soft top,&lt;br /&gt;fast,&lt;br /&gt;slow&lt;/p&gt;&lt;p&gt;My intention is that if a user searched for the tags Blue and 4 wheels, they would see cars 2 and 3. If they then added 'fast' they should only see car 2.&lt;/p&gt;&lt;p&gt;Any ideas?&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;T.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Site search using page tags &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19134&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19134&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 02 Feb 2012 22:50:51 +1300</pubDate>
			<dc:creator>NETim</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19134</guid>
		</item>
		
		<item>
			<title>Re: SOAPModelAccess / Content-Type of response</title>
			<link>http://www.silverstripe.org/data-model-questions/show/13347#post311570</link>
			<description>&lt;p&gt;search in the following link , it may help u&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://csharp.net-informations.com/communications/csharp-communications-tutorial.htm&quot; rel=&quot;nofollow&quot;&gt;http://csharp.net-informations.com/communications/csharp-communications-tutorial.htm&lt;/a&gt;&lt;/p&gt;&lt;p&gt;savs.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: SOAPModelAccess / Content-Type of response &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/13347#post311570&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/13347&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 02 Feb 2012 08:31:56 +1300</pubDate>
			<dc:creator>saviolan</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/13347#post311570</guid>
		</item>
		
		<item>
			<title>Re: Getting DataObjects with NULL values</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19053#post311293</link>
			<description>&lt;p&gt;Jackpot!&lt;/p&gt;&lt;p&gt;Wow, that was fast and the perfect answer. Thanks so much  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Getting DataObjects with NULL values &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19053#post311293&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19053&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 20 Jan 2012 23:08:26 +1300</pubDate>
			<dc:creator>NicolasLeuenberger</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19053#post311293</guid>
		</item>
		
		<item>
			<title>Re: Getting DataObjects with NULL values</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19053#post311292</link>
			<description>&lt;p&gt;how about &quot;Date IS NULL&quot; I think that is how MYSQL does it&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Getting DataObjects with NULL values &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19053#post311292&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19053&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 20 Jan 2012 23:06:35 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19053#post311292</guid>
		</item>
		
		<item>
			<title>Getting DataObjects with NULL values</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19053</link>
			<description>&lt;p&gt;Hi dear community&lt;/p&gt;&lt;p&gt;One of my models is an event (AgendaEintrag) with a DateField. If no date is set, the MySQL-Entry contains the value NULL. Now I'd like to display all Events without a date. This does not work:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;$agendaEintraege = DataObject::get(&quot;AgendaEintrag&quot;, &quot;Date=NULL&quot;, &quot;Date ASC&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;If I search for anything else, it works. I can for example display past events:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;$agendaEintraege = DataObject::get(&quot;AgendaEintrag&quot;, &quot;Date=&amp;lt;CURDATE()&quot;, &quot;Date ASC&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Any idea how I can get those NULL containing entries? Thanks  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Getting DataObjects with NULL values &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19053&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19053&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 20 Jan 2012 23:00:48 +1300</pubDate>
			<dc:creator>NicolasLeuenberger</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19053</guid>
		</item>
		
		<item>
			<title>Re: Large number of files - are there plans to fix this?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18720#post311286</link>
			<description>&lt;p&gt;Thanks Willr, I'll have to have a squiz through the ORM stuff for 3.0 and see if there's anything in there for really large dataobjectsets.   &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Large number of files - are there plans to fix this? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18720#post311286&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18720&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 20 Jan 2012 16:30:08 +1300</pubDate>
			<dc:creator>Darren Inwood</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18720#post311286</guid>
		</item>
		
		<item>
			<title>Re: Large number of files - are there plans to fix this?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18720#post311285</link>
			<description>&lt;p&gt;&lt;em&gt;Are there any plans to move operations like these to offline processes?&lt;/em&gt;&lt;/p&gt;&lt;p&gt;I had a look through the road map and can't see anything like this planned, couple performance related tickets (e.g &lt;a href=&quot;http://open.silverstripe.org/ticket/6534&quot; rel=&quot;nofollow&quot;&gt;http://open.silverstripe.org/ticket/6534&lt;/a&gt;)&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Large number of files - are there plans to fix this? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18720#post311285&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18720&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 20 Jan 2012 16:13:22 +1300</pubDate>
			<dc:creator>Willr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18720#post311285</guid>
		</item>
		
		<item>
			<title>Re: Large number of files - are there plans to fix this?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18720#post311244</link>
			<description>&lt;p&gt;If you didn't get a response and this is so urgent I'd raise it as a critical issue ont he open.silverstripe.org and hang out in NZ time on IRC to catch a silverstripe person to address this.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Large number of files - are there plans to fix this? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18720#post311244&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18720&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 18 Jan 2012 23:21:33 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18720#post311244</guid>
		</item>
		
		<item>
			<title>Re: Large number of files - are there plans to fix this?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18720#post311231</link>
			<description>&lt;p&gt;This is about to cost us a major customer, can anybody at SilverStripe comment on whether or not any changes to the way Files are processed are planned?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Large number of files - are there plans to fix this? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18720#post311231&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18720&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 18 Jan 2012 14:29:49 +1300</pubDate>
			<dc:creator>Darren Inwood</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18720#post311231</guid>
		</item>
		
		<item>
			<title>Re: formatting date on results of custom query?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18525?start=8#post311199</link>
			<description>&lt;p&gt;After dropping this for weeks, I went back to work on it today and finally figured it out.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.silverstripe.org/template-questions/show/14058&quot; rel=&quot;nofollow&quot;&gt;This page&lt;/a&gt; had the info I needed.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: formatting date on results of custom query? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18525?start=8#post311199&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18525&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 17 Jan 2012 10:08:33 +1300</pubDate>
			<dc:creator>johnofjack</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18525?start=8#post311199</guid>
		</item>
		
		<item>
			<title>DataObject::get() returns NULL when no records are found?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19013</link>
			<description>&lt;p&gt;Hi everyone,&lt;/p&gt;&lt;p&gt;I'm not sure I fully understand all the inners of DataObject yet, but I'm surprised to see that executing DataObject::get() with a filter that returns no record returns nothing, rather than an empty DataObjectSet. Is this normal?&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;// assuming that the database contains no record which Date &amp;gt; CURDATE()&lt;/p&gt;&lt;p&gt;$news_articles = DataObject::get(&quot;NewsArticle&quot;, &quot;Date &amp;gt; CURDATE()&quot;);&lt;br /&gt;return $news_articles; // This returns NULL.&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Thanks for your help!&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: DataObject::get() returns NULL when no records are found? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19013&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19013&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 16 Jan 2012 10:35:40 +1300</pubDate>
			<dc:creator>GuillaumeC</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19013</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973?start=8#post311113</link>
			<description>&lt;p&gt;I like to help out where I can  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973?start=8#post311113&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 14 Jan 2012 05:25:11 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973?start=8#post311113</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973?start=8#post311112</link>
			<description>&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;That was a remarkably fast response. &lt;/p&gt;&lt;p&gt;Worked a charm. The CRM section now works as planned. &lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;T.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973?start=8#post311112&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 14 Jan 2012 05:03:37 +1300</pubDate>
			<dc:creator>NETim</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973?start=8#post311112</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973#post311111</link>
			<description>&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getCMSFields() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields = parent::getCMSFields();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;removeByName('FIELDNAMEHERE');&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $fields;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973#post311111&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 14 Jan 2012 04:56:23 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973#post311111</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973#post311110</link>
			<description>&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;You raise a good point.&lt;/p&gt;&lt;p&gt;My next issue would have been disabling the fields anyway. This way seems simpler. Less points at which it could go wrong.&lt;/p&gt;&lt;p&gt;Cheers,&lt;/p&gt;&lt;p&gt;T.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973#post311110&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 14 Jan 2012 04:51:36 +1300</pubDate>
			<dc:creator>NETim</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973#post311110</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973#post311102</link>
			<description>&lt;p&gt;use getCMSFields&lt;br /&gt;but I hide them - that way it doens't even give the user the ilusion they can modifiy it&lt;br /&gt;and ensure you always get teh right memberid/created date instead of the one they want to add&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973#post311102&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 14 Jan 2012 00:27:57 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973#post311102</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973#post311101</link>
			<description>&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;That handles the after insertion part. &lt;/p&gt;&lt;p&gt;Any ideas on pre-populating those values when adding the note? The fields are editable when you add a new note and my intention is to have them set with the values to begin with.&lt;/p&gt;&lt;p&gt;If it's not possible then I can always go with hiding them from the form and just set them in the background.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;T.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973#post311101&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 14 Jan 2012 00:12:39 +1300</pubDate>
			<dc:creator>NETim</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973#post311101</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973#post311099</link>
			<description>&lt;p&gt;the onBeforeWrite is a function to be placed in your Notes DataObject.&lt;br /&gt;to see the created date (that the system writes automatically) this will help...&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18942&quot; rel=&quot;nofollow&quot;&gt;http://www.silverstripe.org/data-model-questions/show/18942&lt;/a&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973#post311099&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 13 Jan 2012 22:30:16 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973#post311099</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973#post311098</link>
			<description>&lt;p&gt;swaiba,&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;&lt;p&gt;I had seen a few people mention the date fields but haven't had any success in using them. &lt;/p&gt;&lt;p&gt;With the function you listed, how would it be called in the context of ModelAdmin. Would I need to call it or would it be called when saving a record?&lt;/p&gt;&lt;p&gt;The basic idea of what I am trying to achieve is thus:&lt;/p&gt;&lt;p&gt;- A visitor to the site fills in the contact form&lt;br /&gt;- When they submit the form, the values from the form are stored as 'SubmittedForm'&lt;br /&gt;- In the CMS there is a new ModelAdmin which manages the 'SubmittedForm' model&lt;br /&gt;- each 'SubmittedForm' then has many 'Notes'&lt;br /&gt;- each 'Note' should have: 'Content', 'CreatedDate' and 'MemberName'&lt;/p&gt;&lt;p&gt;The only part of this that is not working as I intended is pre-populating the 'Date' and 'MemberName' fields in the pop-up when a user adds a new 'Note'.&lt;/p&gt;&lt;p&gt;The reason I am trying to pre-populate is to ensure the integrity of the data, so that we can be sure of exactly when, and by whom, the note was added without having to trust the user not to have entered false data.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;T.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973#post311098&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 13 Jan 2012 22:27:23 +1300</pubDate>
			<dc:creator>NETim</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973#post311098</guid>
		</item>
		
		<item>
			<title>Using SQL BETWEEN and AND together in DataObject::get</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18998</link>
			<description>&lt;p&gt;Greets,&lt;/p&gt;&lt;p&gt;I am trying to return &quot;Appointment&quot; DataObjects in the morning in one function, and then in the afternoon in another. It's throwing an error due to the double &quot;and&quot;'s in the statement. I have never used BETWEEN before in SS.&lt;/p&gt;&lt;p&gt;DataTypes being used are Date and Time.&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getMorningAppointments() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$today = date('Y-m-d');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$appointments = DataObject::get(&quot;Appointment&quot;, &quot;`Date` = '{$today}' AND `Time` BETWEEN '07:00:00' AND '11:59:59'&quot;); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $appointments;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getAfternoonAppointments() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$today = date('Y-m-d');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$appointments = DataObject::get(&quot;Appointment&quot;, &quot;`Date` = '{$today}' AND `Time` BETWEEN '12:00:00' AND '23:59:59'&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $appointments;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Any pointers greatly appreciated.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Using SQL BETWEEN and AND together in DataObject::get &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18998&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18998&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 13 Jan 2012 09:04:02 +1300</pubDate>
			<dc:creator>subvert</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18998</guid>
		</item>
		
		<item>
			<title>Re: Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973#post311079</link>
			<description>&lt;p&gt;Hi NETim,&lt;/p&gt;&lt;p&gt;Welcome to the forums!&lt;/p&gt;&lt;p&gt;I don't really follow...&lt;/p&gt;&lt;p&gt;&lt;em&gt;The 'note' field works fine, as do the 'Date' and 'Member' fields. The problem comes when I try and set default values for the last 2 fields&lt;/em&gt;&lt;/p&gt;&lt;p&gt;are date and member the last two fileds?&lt;/p&gt;&lt;p&gt;first date is superflous because every record has a created and lasted edited field within it.&lt;br /&gt;second the Member could be addin like follows..&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function onBeforeWrite() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::onBeforeWrite();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;gt;MemberID = Member::currentUserID();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973#post311079&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 13 Jan 2012 06:27:17 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973#post311079</guid>
		</item>
		
		<item>
			<title>Re: DataObjectSet in DataObject</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18993#post311074</link>
			<description>&lt;p&gt;Yes you can!&lt;/p&gt;&lt;p&gt;You just have to take care to assign it to the right variable! gosh&lt;br /&gt;Im Sorry&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: DataObjectSet in DataObject &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18993#post311074&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18993&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 13 Jan 2012 05:21:42 +1300</pubDate>
			<dc:creator>ivo</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18993#post311074</guid>
		</item>
		
		<item>
			<title>DataObjectSet in DataObject</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18993</link>
			<description>&lt;p&gt;Hi,&lt;br /&gt;can i set a DataObjectSet in a Dataobject?&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;...&lt;br /&gt;$list = new DataObjectSet();&lt;br /&gt;            foreach ($dates as $d =&amp;gt; $data) {&lt;br /&gt;                $do = new DataObject();&lt;br /&gt;                $do-&amp;gt;Date = $d;&lt;br /&gt;                $do-&amp;gt;Total = $data;&lt;br /&gt;                $list-&amp;gt;push($do);&lt;br /&gt;            }&lt;/p&gt;&lt;p&gt;$DO-&amp;gt;DatesList = $list;&lt;br /&gt;return $DO;&lt;br /&gt;...&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;and in the template call it via a nested control:&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;lt;% control DO %&amp;gt;&lt;br /&gt;    &amp;lt;div&amp;gt;&lt;br /&gt;            $ID&lt;br /&gt;            &amp;lt;% control DatesList %&amp;gt;&lt;br /&gt;                $Date $Total&lt;br /&gt;            &amp;lt;% end_control %&amp;gt;&lt;br /&gt;        &amp;lt;hr/&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;    &lt;br /&gt;&amp;lt;% end_control %&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Well i tried it but it doesnt seem to work.&lt;/p&gt;&lt;p&gt;Is there a alternative way to achieve something like that?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: DataObjectSet in DataObject &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18993&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18993&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 13 Jan 2012 05:11:58 +1300</pubDate>
			<dc:creator>ivo</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18993</guid>
		</item>
		
		<item>
			<title>Re: $ClassName on translatable pages not updated after pagetype change [SOLVED]</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18957#post311018</link>
			<description>&lt;p&gt;How stupid can a man be? I just forgot to SAVE &amp;amp; PUBLISH the updated tranlated pages :\&lt;br /&gt;Sorry for wasting you time.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: $ClassName on translatable pages not updated after pagetype change [SOLVED] &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18957#post311018&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18957&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 12 Jan 2012 02:55:50 +1300</pubDate>
			<dc:creator>balder</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18957#post311018</guid>
		</item>
		
		<item>
			<title>Setting dynamic default values with ModelAdmin</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18973</link>
			<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Been fighting with this for a little while now.&lt;/p&gt;&lt;p&gt;I have put together a very basic CRM in SS using ModelAdmin where the details from a contact form are stored in the DB and shown under a tab section called CRM. What I'm trying to do with it now is to add a notes section where multiple notes can be stored with the date they were added and the member that added them.&lt;/p&gt;&lt;p&gt;The 'note' field works fine, as do the 'Date' and 'Member' fields. The problem comes when I try and set default values for the last 2 fields. &lt;/p&gt;&lt;p&gt;I have dug around the forums and a host of other sites for this and can't find anything about doing this with ModelAdmin.&lt;/p&gt;&lt;p&gt;Any help would be great.&lt;/p&gt;&lt;p&gt;T.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Setting dynamic default values with ModelAdmin &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18973&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18973&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 12 Jan 2012 01:53:34 +1300</pubDate>
			<dc:creator>NETim</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18973</guid>
		</item>
		
		<item>
			<title>Re: print array ,another problem</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18971#post311014</link>
			<description>&lt;p&gt;Hi snaip,&lt;/p&gt;&lt;p&gt;assuming that you create the array() within an Model extending Page / SiteTree I guess I would create a DataObjectSet (&lt;a href=&quot;http://api.silverstripe.org/2.4/sapphire/model/DataObjectSet.html&quot; rel=&quot;nofollow&quot;&gt;http://api.silverstripe.org/2.4/sapphire/model/DataObjectSet.html&lt;/a&gt;) and return it to the Template. There you can loop it as a control.&lt;/p&gt;&lt;p&gt;Besides that I think that you should try to get this DataObjectSet directly from DB, without writing it into an array first and than back. Also I would try to get the Set with just one request. Doing DB-Requests (DataObject::get()) within a loop are not ideal for system performance and can be usually replaced by a single one (that's what databases live for ;)).&lt;/p&gt;&lt;p&gt;Regards&lt;br /&gt;SF.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: print array ,another problem &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18971#post311014&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18971&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 12 Jan 2012 00:56:45 +1300</pubDate>
			<dc:creator>Silverfish</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18971#post311014</guid>
		</item>
		
		<item>
			<title>print array ,another problem</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18971</link>
			<description>&lt;p&gt;hi&lt;/p&gt;&lt;p&gt;i cant find any solution for my problem (probably pretty easy)&lt;/p&gt;&lt;p&gt;i have an array&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;$array = array();&lt;/p&gt;&lt;p&gt;        $data = DataObject::get('ModulKalendariumRok');&lt;br /&gt;        foreach ($data as $row) {&lt;br /&gt;            $data = DataObject::get('ModulKalendarium', &quot;Rok = '$row-&amp;gt;Rok'&quot;);&lt;br /&gt;            foreach ($data as $row) {&lt;br /&gt;                $array['Kalendarium'][$row-&amp;gt;Rok][] = $row-&amp;gt;Wydarzenie;&lt;br /&gt;            }&lt;br /&gt;        }&lt;/p&gt;&lt;p&gt;        return new ArrayData($array);&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; print_r($array) &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;Array&lt;br /&gt;(&lt;br /&gt;    [Kalendarium] =&amp;gt; Array&lt;br /&gt;        (&lt;br /&gt;            [2011] =&amp;gt; Array&lt;br /&gt;                (&lt;br /&gt;                    [0] =&amp;gt; test 2011&lt;br /&gt;                    [1] =&amp;gt; test v2 2011&lt;br /&gt;                )&lt;/p&gt;&lt;p&gt;            [2010] =&amp;gt; Array&lt;br /&gt;                (&lt;br /&gt;                    [0] =&amp;gt; test 2010&lt;br /&gt;                )&lt;/p&gt;&lt;p&gt;        )&lt;/p&gt;&lt;p&gt;)&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;how to display it in the template to getting something like this:&lt;/p&gt;&lt;p&gt;2011&lt;br /&gt;- test 2011&lt;br /&gt;- test v2 2011&lt;/p&gt;&lt;p&gt;2010&lt;br /&gt;- test 2010&lt;/p&gt;&lt;p&gt;?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: print array ,another problem &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18971&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18971&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 11 Jan 2012 22:36:26 +1300</pubDate>
			<dc:creator>snaip</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18971</guid>
		</item>
		
		<item>
			<title>Re: Show Created date in model admin lists</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18942#post311012</link>
			<description>&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public static $summary_fields = array (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'CreatedText',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $casting = array(&quot;CreatedText&quot; =&amp;gt; &quot;Text&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function CreatedText() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $this-&amp;gt;Created;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;(note:untested)&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Show Created date in model admin lists &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18942#post311012&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18942&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 11 Jan 2012 22:24:52 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18942#post311012</guid>
		</item>
		
		<item>
			<title>Re: Show Created date in model admin lists</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18942#post311009</link>
			<description>&lt;p&gt;Are you able to provide an example?&lt;/p&gt;&lt;p&gt;All I am looking to do is show the Created and LastEdited columns in a model admin search results table.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Show Created date in model admin lists &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18942#post311009&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18942&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 11 Jan 2012 16:28:00 +1300</pubDate>
			<dc:creator>smartfaceweb</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18942#post311009</guid>
		</item>
		
		<item>
			<title>$ClassName on translatable pages not updated after pagetype change [SOLVED]</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18957</link>
			<description>&lt;p&gt;Title says it all... i just updated a website by creating a new page type for a set of pages: when i switch to the new page type in the main language, i can see everything gets updated on the tranlated pages as well (note that in the backend the dropdown for the pagetype in the translated pages is greyed out, and shows the new pagetype name) which seems perfect. BUT when i actually go to the frontend, the translated pages still show the old layout. And printing the $ClassName shows the old one as expected.&lt;br /&gt;Am i missing something, is there a bug, or maybe i just did something wrong (but i cannot figure what, when or where!)&lt;br /&gt;Thanks for any help!&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: $ClassName on translatable pages not updated after pagetype change [SOLVED] &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18957&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18957&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 11 Jan 2012 06:20:02 +1300</pubDate>
			<dc:creator>balder</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18957</guid>
		</item>
		
		<item>
			<title>Re: Show Created date in model admin lists</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18942#post310953</link>
			<description>&lt;p&gt;I use casting for this...&lt;br /&gt;&lt;a href=&quot;http://doc.silverstripe.org/sapphire/en/topics/datamodel#casting&quot; rel=&quot;nofollow&quot;&gt;http://doc.silverstripe.org/sapphire/en/topics/datamodel#casting&lt;/a&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Show Created date in model admin lists &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18942#post310953&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18942&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 10 Jan 2012 04:32:50 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18942#post310953</guid>
		</item>
		
		<item>
			<title>Show Created date in model admin lists</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18942</link>
			<description>&lt;p&gt;How do i do this, I have tried adding 'Created' to the $summary_fields array.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Show Created date in model admin lists &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18942&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18942&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 09 Jan 2012 23:08:13 +1300</pubDate>
			<dc:creator>smartfaceweb</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18942</guid>
		</item>
		
		<item>
			<title>Escaping commas in Enum()</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18871</link>
			<description>&lt;p&gt;&quot;Enum('Value1, Value2, Value3')&quot;&lt;/p&gt;&lt;p&gt;But what if I wanted:&lt;/p&gt;&lt;p&gt;&quot;Enum('Value 1, and some Value 2', 'Value 2, and a little bit of Value 7', 'Value3, cake and pie')&quot;&lt;/p&gt;&lt;p&gt;As far as I can tell there's no easy way to do this. I have tried escaping the commas in one string, tried passing it as multiple strings (which of course didn't work), even created this field with &amp;amp;#44; ASCII commas in the hopes that it would write to DB in the raw format, but output in the proper encoding. This was probably the closest attempt at faking this, but the front-end fields are actually just outputting &amp;amp;#44; as raw text.&lt;/p&gt;&lt;p&gt;Feel free to ignore this, it's more of an aesthetics question, I have for now replaced the commas with + that should hopefully carry the same meaning.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Escaping commas in Enum() &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18871&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18871&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 29 Dec 2011 11:52:24 +1300</pubDate>
			<dc:creator>mikhail</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18871</guid>
		</item>
		
		<item>
			<title>DataObject::get with Translatable ON - SiteTree/Page difference.</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18867</link>
			<description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;im using this really simple setup, but im surprised with odd behaviour.&lt;/p&gt;&lt;p&gt;This code will return only localized pages:&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;return DataObject::get(&quot;SiteTree&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;this is returning all pages - doesn't care about locale:&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;return DataObject::get(&quot;Page&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;SS version:&lt;br /&gt;SS 2.4.6&lt;/p&gt;&lt;p&gt;mysite/_config.php:&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;Translatable::set_default_locale('en_US');&lt;br /&gt;Object::add_extension('SiteTree','Translatable');&lt;br /&gt;Object::add_extension('SiteConfig','Translatable');&lt;br /&gt;Translatable::set_allowed_locales(array('en_US','ru_RU'));&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;mysite/code/Page.php &amp;gt;&amp;gt; Page_Controller:&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;public function init() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::init();        &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if($this-&amp;gt;dataRecord-&amp;gt;hasExtension('Translatable')) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i18n::set_locale($this-&amp;gt;dataRecord-&amp;gt;Locale);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;setlocale(LC_TIME, $this-&amp;gt;dataRecord-&amp;gt;Locale . &quot;.utf8&quot;); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;...&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Is this standard behaviour? &lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;Pali&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: DataObject::get with Translatable ON - SiteTree/Page difference. &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18867&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18867&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 29 Dec 2011 03:25:01 +1300</pubDate>
			<dc:creator>pali</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18867</guid>
		</item>
		
		<item>
			<title>Re: formatting date on results of custom query?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18525#post310691</link>
			<description>&lt;p&gt;Useful Discussion&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: formatting date on results of custom query? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18525#post310691&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18525&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 27 Dec 2011 20:45:27 +1300</pubDate>
			<dc:creator>Mitchell</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18525#post310691</guid>
		</item>
		
		<item>
			<title>Re: formatting date on results of custom query?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18525#post310684</link>
			<description>&lt;p&gt;I experimented with this at length, couldn't get it to work, decided to leave it alone awhile, came back to it, still can't get it to work.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: formatting date on results of custom query? &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18525#post310684&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18525&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 26 Dec 2011 03:32:46 +1300</pubDate>
			<dc:creator>johnofjack</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18525#post310684</guid>
		</item>
		
		<item>
			<title>DataObject partial translation</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18857</link>
			<description>&lt;p&gt;hey there,&lt;/p&gt;&lt;p&gt;I'm working on a small Google Maps project at the moment. This involves a lot of DataObjects representing markers on my map. Of course by translating the page in other languages the coordinates of my markers stay the same. So I figured out an imo simple way for an universal method for the partial translation of my DataObjects. There are still some small problems, but for now I just want to know what you guys think about it and what could be done better. I'm far away from being a pro, so there will be space for improvements, thats for sure ;)&lt;/p&gt;&lt;p&gt;Right, here is what I did.&lt;/p&gt;&lt;p&gt;At first I created an basic object which holds the language and the relationship to the DataObject, that will be partly translatable.&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class TranslatedObjectPart extends DataObject&lt;br /&gt;{&lt;br /&gt;    static $db = array (&lt;br /&gt;        'Lang' =&amp;gt; 'Varchar(10)'&lt;br /&gt;    );&lt;/p&gt;&lt;p&gt;    static $has_one = array (&lt;br /&gt;        'TranslatableDataObject' =&amp;gt; 'TranslatableDataObject'&lt;br /&gt;    );&lt;/p&gt;&lt;p&gt;    public function getCMSFields() {&lt;br /&gt;        $allowedLang = Translatable::get_allowed_locales();&lt;br /&gt;        if (empty($allowedLang))&lt;br /&gt;            $allowedLang[] = i18n::default_locale ();&lt;br /&gt;        $langs = array_combine($allowedLang, $allowedLang);&lt;/p&gt;&lt;p&gt;        return new FieldSet(&lt;br /&gt;            new DropdownField('Lang', 'Sprache', $langs)&lt;br /&gt;        );&lt;br /&gt;    }&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Then I have an object, which actually holds one (or possibly more) parts, which can be created in every language you get from Translatable::get_allowed_locales(). The thing I like is that basicly you can translate any data type, not only text. For example you could add a has_one relation to an Image or any other DataObject. I hope you know, what I mean ;)&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class TranslatedText extends TranslatedObjectPart&lt;br /&gt;{&lt;br /&gt;    static $db = array (&lt;br /&gt;        'Text' =&amp;gt; 'Text'&lt;br /&gt;    );&lt;/p&gt;&lt;p&gt;    public function getCMSFields() {&lt;br /&gt;        $f = parent::getCMSFields();&lt;br /&gt;        $f-&amp;gt;insertAfter(new TextareaField('Text'), &quot;Lang&quot;);&lt;br /&gt;        return $f;&lt;br /&gt;    }&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;After that I made a base class for any DataObject, which should be partially translated. This class is very simple, it just deletes all of it8s (partial) translations before it gets deleted.&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class TranslatableDataObject extends DataObject {&lt;br /&gt;    function onBeforeDelete() {&lt;br /&gt;        parent::onBeforeDelete();&lt;br /&gt;        $translations = DataObject::get(&quot;TranslatedObjectPart&quot;, &quot;TranslatableDataObjectID = $this-&amp;gt;ID&quot;);&lt;br /&gt;        foreach ($translations-&amp;gt;toArray() as $tran)&lt;br /&gt;            $tran-&amp;gt;delete();&lt;br /&gt;    }&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Finally, my object which gets translated. I was surprised that you can insert a DataObjectManager into a popup, which itself ist opened by a DOM from a Page, but it works  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt;  Now I can add translations for the Title, while the rest stays the same. Using TitleInCurrentLang() I get the translation of the Title or the normal Title as fallback.&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class MyDataObject extends TranslatableDataObject&lt;br /&gt;{&lt;br /&gt;    static $db = array (&lt;br /&gt;        'Title' =&amp;gt; 'Text',&lt;br /&gt;        'CenterLat' =&amp;gt; 'Double',&lt;br /&gt;        'CenterLng' =&amp;gt; 'Double',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'MapZoom' =&amp;gt; 'Int'&lt;br /&gt;    );&lt;/p&gt;&lt;p&gt;    static $has_many = array (&lt;br /&gt;        'TranslatedTitle' =&amp;gt; 'TranslatedText'&lt;br /&gt;    );&lt;/p&gt;&lt;p&gt;    public function getCMSFields() {        &lt;br /&gt;        return new FieldSet(&lt;br /&gt;            new TextField('Title','Titel'),&lt;br /&gt;            new DataObjectManager(&lt;br /&gt;                $this, // Controller&lt;br /&gt;                'TranslatedTitle', // Source name&lt;br /&gt;                'TranslatedText', // Source class&lt;br /&gt;                array(&lt;br /&gt;                    'Text' =&amp;gt; 'Titel',&lt;br /&gt;                    'Lang' =&amp;gt; 'Sprache'&lt;br /&gt;                ),&lt;br /&gt;                'getCMSFields()'&lt;br /&gt;            ),&lt;br /&gt;            new NumericField('CenterLat', 'Breitengrad des Mittepunkts (zB 50.12345)', 0.00000),&lt;br /&gt;            new NumericField('CenterLng', 'Längengrad  des Mittepunkts (zB 11.12345)', 0.00000),&lt;br /&gt;            new NumericField('MapZoom', 'Zoomstufe der Karte', 2)&lt;br /&gt;        );&lt;br /&gt;    }&lt;/p&gt;&lt;p&gt;    function TitleInCurrentLang(){&lt;br /&gt;        $lang = Translatable::get_current_locale();&lt;br /&gt;        $title = DataObject::get_one(&quot;TranslatedText&quot;, &quot;TranslatableDataObjectID = $this-&amp;gt;ID AND Lang = '$lang'&quot;);&lt;br /&gt;        if ($title)&lt;br /&gt;            return $title-&amp;gt;Text;&lt;br /&gt;        return $this-&amp;gt;ViewTitle;&lt;br /&gt;    }    &lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;However, there are some little drawbacks with this approach. The popup in the popup is opened at the bottom (not really a problem).  And because of the filter in the DataObject::get_one() call inside TitleInCurrentLang() I can only have one TranslatedText per TranslatableDataObject, in more general terms only one object extending TranslatedObjectPart of the same class per TranslatableDataObject. I have some small ideas to work this out...and maybe you guys can give me a push in the right direction? ;)&lt;/p&gt;&lt;p&gt;Anyway, thats it for now, I'm going home. Merry Chrismas to you all.&lt;/p&gt;&lt;p&gt;dreadman&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: DataObject partial translation &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18857&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18857&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 24 Dec 2011 05:15:24 +1300</pubDate>
			<dc:creator>dreadman</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18857</guid>
		</item>
		
		<item>
			<title>Re: Object Relations with many_many</title>
			<link>http://www.silverstripe.org/data-model-questions/show/13755#post310611</link>
			<description>&lt;p&gt;This is a little confusing the title is &quot;many_many&quot; but the notation in both posts are &quot;1-n&quot; and &quot;n-m&quot;... maybe if you stick to a slightly more long hand &quot;has_many&quot; or &quot;many_many&quot; this would be crystal clear.&lt;/p&gt;&lt;p&gt;Using ModelAdmin I have not come across any relationship depths it is unable to handle in the form...&lt;/p&gt;&lt;p&gt;a has_many b&lt;br /&gt;b has_many c&lt;br /&gt;c has_many d&lt;/p&gt;&lt;p&gt;It opens a greybox popup to edit the relationship and then if you keep drilling down it down replace the greybox popup with the new one.  This has a limitation of no back (i.e. once editing d you can only return to a, not c).&lt;/p&gt;&lt;p&gt;If d has_many a this creates a circle and the scaffolding fails - easily fixed by removing it within getCMSFields, but it ends the ability to &quot;drill down&quot; into the relationship.&lt;/p&gt;&lt;p&gt;I normally handle the many_many with multi select rather than the ManyManyComplexTableField, but I assume if I didn't it would allow the editing of the relationship as above.&lt;/p&gt;&lt;p&gt;So to summarise - avoid circular relationships and try to use ModelAdmin.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Object Relations with many_many &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/13755#post310611&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/13755&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 19 Dec 2011 06:48:39 +1300</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/13755#post310611</guid>
		</item>
		
		<item>
			<title>Re: Object Relations with many_many</title>
			<link>http://www.silverstripe.org/data-model-questions/show/13755#post310610</link>
			<description>&lt;p&gt;I work since four weeks with SS, and my primary concern is not the flashy lights and bells, but the management of a datamodel with several levels : objectA N----M object B N------M object C N------M object D&lt;br /&gt;I have same concerns of yours and I'm afraid that SS is not capable of handing this.&lt;br /&gt;F.Ex the DOM is very nice but only handles up to 2 levels .&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Object Relations with many_many &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/13755#post310610&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/13755&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 19 Dec 2011 04:51:53 +1300</pubDate>
			<dc:creator>sergieboy</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/13755#post310610</guid>
		</item>
		
		<item>
			<title>Re: write() - Method on Field of Subclass of $has_many - DataObject </title>
			<link>http://www.silverstripe.org/data-model-questions/show/18822#post310607</link>
			<description>&lt;p&gt;Ok, my Problem seems to be solved.&lt;br /&gt;After min. 5 Hours walking down the wrong way I figured out that my Eventhandler onAfterWrite has to be changed in onBeforeWrite...&lt;/p&gt;&lt;p&gt;;-s&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: write() - Method on Field of Subclass of $has_many - DataObject  &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18822#post310607&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18822&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 19 Dec 2011 03:58:22 +1300</pubDate>
			<dc:creator>mtz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18822#post310607</guid>
		</item>
		
		<item>
			<title>write() - Method on Field of Subclass of $has_many - DataObject </title>
			<link>http://www.silverstripe.org/data-model-questions/show/18822</link>
			<description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;i got that following setup:&lt;/p&gt;&lt;p&gt;Page-Class width 2 $has_many relations, to: lets say &quot;Customer&quot;- and &quot;CustomerPremium&quot;- DataObjects.&lt;br /&gt;My CustomerPremuim - Class is a direct Subclass of Customer.&lt;/p&gt;&lt;p&gt;Now i want an db-write - operation (update a Field) on each related CustomerPremium DataObject in that onAfterWrite() - Method on the Page-Class.&lt;/p&gt;&lt;p&gt;If i target the Parent-Class &quot;Customer&quot; with &quot;$this-&amp;gt;Customer()&quot; the write() Method works, but not on the Subclass. &lt;br /&gt;Even since the Subclass has its own $has_many relation in Page.&lt;/p&gt;&lt;p&gt;Any Idea why is that?  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/sad.gif'&gt; &lt;/p&gt;&lt;p&gt;if i print out the result of the iteration i get my regular DataObjects in any case. So i'm wondering that i cant write to it just because&lt;br /&gt;its an Subclass.  &lt;/p&gt;&lt;p&gt;my code is:&lt;br /&gt;class Page extends .... {&lt;/p&gt;&lt;p&gt;$has_many {&lt;br /&gt;     &quot;Customers&quot; =&amp;gt; &quot;Customer&quot;,&lt;br /&gt;     &quot;CustomersPremium&quot; =&amp;gt; &quot;CustomerPremium&quot;&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;function onAfterWrite(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach($this-&amp;gt;CustomerPremium() as $i) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$i-&amp;gt;Format = &quot;482 x 288&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$i-&amp;gt;write();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::onAfterWrite();&lt;/p&gt;&lt;p&gt;.....&lt;/p&gt;&lt;p&gt;Thanks!&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: write() - Method on Field of Subclass of $has_many - DataObject  &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18822&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18822&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 17 Dec 2011 05:41:58 +1300</pubDate>
			<dc:creator>mtz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18822</guid>
		</item>
		
		<item>
			<title>Default disable  object in DataObject</title>
			<link>http://www.silverstripe.org/data-model-questions/show/18819</link>
			<description>&lt;p&gt;Hi,&lt;br /&gt;I have a problem.&lt;/p&gt;&lt;p&gt;On my site I have a registration form for mail confirmation.&lt;br /&gt;Each user after registration has a subsite with form to report new objectsleep .&lt;/p&gt;&lt;p&gt;The form requires the name object, address, etc. ...&lt;br /&gt;Form application write in the DataObject.&lt;br /&gt;How to make an application which is stored in the database was set by default to not display on the page&lt;/p&gt;&lt;p&gt;otherwise:&lt;br /&gt;My point is that the notification sent by member in the database which  to save the &quot;ObjectSleep&quot; it was turned off for as long as admin does not approve it.&lt;/p&gt;&lt;p&gt;At the moment member send the form saves the object in the database but it is automatically visible to others.&lt;/p&gt;&lt;p&gt;My code:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class Obiekt extends DataObject {&lt;/p&gt;&lt;p&gt;//--------------- BAZA DANYCH --------------- //&lt;br /&gt;    static $db = array(&lt;br /&gt;      'Title' =&amp;gt; 'Varchar(255)',&lt;br /&gt;      'NazwaObiektu' =&amp;gt; 'Varchar(255)',&lt;br /&gt;      'KodPocztowy' =&amp;gt; 'Varchar(6)',&lt;br /&gt;      'Miejscowosc' =&amp;gt; 'Varchar(255)',&lt;br /&gt;      'Ulica' =&amp;gt; 'Varchar(255)',&lt;br /&gt;      'NrDomu' =&amp;gt; 'Varchar(6)',&lt;br /&gt;      'Telefon' =&amp;gt; 'Int',&lt;br /&gt;      'TelefonDodatkowy' =&amp;gt; 'Int',&lt;br /&gt;      'Email' =&amp;gt; 'Varchar(255)',&lt;br /&gt;      'Strona' =&amp;gt; 'Varchar(255)',&lt;br /&gt;      'DostepnoscObiektu' =&amp;gt; 'Boolean',&lt;br /&gt;      'Pokoj1' =&amp;gt; 'Boolean',&lt;br /&gt;      'Pokoj2' =&amp;gt; 'Boolean',&lt;br /&gt;      'Pokoj3' =&amp;gt; 'Boolean',&lt;br /&gt;      'Pokoj4' =&amp;gt; 'Boolean',&lt;br /&gt;      'Pokoj5' =&amp;gt; 'Boolean',&lt;br /&gt;      'SrCenaMin' =&amp;gt; 'Int',&lt;br /&gt;      'SrCenaMax' =&amp;gt; 'Int',&lt;br /&gt;      'IloscMiejsc' =&amp;gt; 'Int',&lt;br /&gt;    );&lt;br /&gt;//--------------- ŁĄCZENIA BAZ DANYCH --------------- //    &lt;br /&gt;    static $has_one = array(&lt;br /&gt;      'Wojewodztwo' =&amp;gt; 'Wojewodztwo',&lt;br /&gt;      'Uzytkownik' =&amp;gt; 'Uzytkownik',&lt;br /&gt;      'Region' =&amp;gt; 'Region',&lt;br /&gt;      'Nocleg' =&amp;gt; 'Nocleg',&lt;br /&gt;    );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;//--------------- NAZWA --------------- //&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $singular_name = 'Obiekt';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $plural_name = 'Obiekty';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getTitle() {&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp;return &quot;{$this-&amp;gt;NazwaObiektu}&quot;;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;//--------------- NAZWY POLA FORMULARZA --------------- //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $field_labels = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Title' =&amp;gt; 'NazwaObiektu',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'NazwaObiektu' =&amp;gt; 'Nazwa Obiektu:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'KodPocztowy' =&amp;gt; 'Kod pocztowy:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Miejscowosc' =&amp;gt; 'Miejscowosc:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Ulica' =&amp;gt; 'Ulica:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'NrDomu' =&amp;gt; 'Numer domu / lokalu:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Telefon' =&amp;gt; 'Telefon:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'TelefonDodatkowy' =&amp;gt; 'Telefon dodatkowy:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Email' =&amp;gt; 'Email:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Strona' =&amp;gt; 'Strona www (bez http://):',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'DostepnoscObiektu' =&amp;gt; 'Obiekt dostepny całorocznie:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'SrCenaMin' =&amp;gt; 'Średnia cena noclegu za osobę od:',&lt;br /&gt;      &amp;nbsp;&amp;nbsp;&amp;nbsp;'SrCenaMax' =&amp;gt; 'do:',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;//--------------- NAZWY POLA WYSZUKIWANIA --------------- //&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $searchable_fields = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  'Miejscowosc' =&amp;gt; array (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;'title' =&amp;gt; 'Nazwa miejscowosci',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;'field' =&amp;gt; 'TextField',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;'filter' =&amp;gt; 'PartialMatchFilter',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  ), &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  'Wojewodztwo.ID' =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;'title' =&amp;gt; 'Województwo',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  ),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  'Region.ID' =&amp;gt; array (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;'title' =&amp;gt; 'Region',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  ), &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  'Nocleg.ID' =&amp;gt; array (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;'title' =&amp;gt; 'Kategoria noclegu',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  ), &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  'SrCenaMin' =&amp;gt; array( &lt;br /&gt;         'field' =&amp;gt; 'TextField', &lt;br /&gt;         'filter' =&amp;gt; 'GreaterThanFilter', &lt;br /&gt;         'title' =&amp;gt; 'Cena / od' &lt;br /&gt;      ),&lt;br /&gt;      'SrCenaMax' =&amp;gt; array( &lt;br /&gt;         'field' =&amp;gt; 'TextField', &lt;br /&gt;         'filter' =&amp;gt; 'LessThanFilter', &lt;br /&gt;         'title' =&amp;gt; 'do / osoba' &lt;br /&gt;      ),&lt;br /&gt;    );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function getDefaultSearchContext() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$context = parent::getDefaultSearchContext();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $context;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//--------------- UPRAWNIENIA --------------- //&lt;br /&gt;    public function canView($member = null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function canCreate($member = null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function canEdit($member = null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(!$member) $member = Member::currentUser();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Permission::checkMember($member, 'ADMIN')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|| ($member &amp;amp;&amp;amp; $member-&amp;gt;ID == $this-&amp;gt;ID)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function canDelete($member = null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $this-&amp;gt;canEdit($member);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;p&gt;  }&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;I think i must use&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;'Status' =&amp;gt; &quot;Enum('Active,Disabled','Disabled')&quot;,&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;and&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;'defaults' =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     'Status' =&amp;gt; 'Disabled'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;but i know idea where i must use this code and&lt;/p&gt;&lt;p&gt;what must be in ContentController which be blocked this object&lt;/p&gt;&lt;p&gt;unless you have a different idea&lt;/p&gt;&lt;p&gt;Sorry for my bad English&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Default disable  object in DataObject &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/18819&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/18819&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 16 Dec 2011 22:17:16 +1300</pubDate>
			<dc:creator>Craftnet</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/18819</guid>
		</item>
		

	</channel>
</rss>
