Sounds like somewhere in your code you are adding your children more
than once, and it is getting cached.

Mark

On Sat, Dec 13, 2008 at 12:40 AM, Stephen Moretti
<[email protected]> wrote:
> I'm getting a weird problem where a user edits a record in the back office,
> the changes go through ok, but when you look at the data on front end there
> is an almost but not quite duplicate of the record.
> I know that this is a caching problem, because if I clear the cache or look
> in the database the returned data is correct.
> The trouble is I don't know exactly which object is causing the problem.
>  I'm reasonably certain its a related object rather than the object that is
> being edited.
> Is there a way to look at the physical content of the cache?
> For information :
> Below are the "offending" objects.  Book is the object being edited.  And
> the getBookArray() method is what is returning multiple entries. It may be
> that I've messed something up with the getBookArray() method, but it seems
> strange that its fine if I clear the cache.
> I'd post the save function, but its a bit on the large size and convoluted
> as I'd have to post methods related decorators as well as the save method.
> Any pointers would be greatly appreciated.
> <object name="book" table="book" decorator="contentobjects.book.bookBean">
> <id name="ID" column="BookID" type="numeric"/>
> <property name="Title" type="string"/>
> <property name="ListTitle" type="string"/>
> <property name="BookType" type="string"/>
> <property name="Summary" type="string"/>
> <property name="SummaryMediaURL" type="string" nullable="true"/>
> <property name="ReadBy" type="string"  nullable="true"/>
> <property name="Copyright" type="string"  nullable="true"/>
> <property name="SignedBy" type="string"  nullable="true"/>
> <property name="isFeaturedStory" type="boolean"/>
> <property name="DateCreated" type="date" ignore-update="true" />
> <property name="DatePublished" type="date" nullable="true"
> ignore-insert="true" />
> <property name="BookImage" type="string"/>
> <property name="MediaURL" type="string" />
> <property name="UniqueName" type="string"/>
> <property name="BuythisURL" type="string" nullable="true" />
> <property name="KeywordList" type="string" nullable="true"/>
> <property name="SynonymList" type="string" nullable="true"/>
> <property name="CounterView" type="numeric"/>
> <property name="CounterPreview" type="numeric"/>
> <onetomany name="StarRating" lazy="true">
> <link to="stories.booktheme" column="BookID" />
> <collection type="array">
> <order property="StarRating" order="desc" />
> </collection>
> </onetomany>
> </object>
> <object name="booktheme" table="booktheme"
> decorator="contentobjects.book.theme.BookThemeBean">
> <compositeid>
> <parentonetomany class="stories.book" />
> <parentonetomany class="stories.theme" />
> </compositeid>
> <property name="StarRating" type="numeric" />
> </object>
> <object name="theme" table="theme"
> decorator="contentobjects.book.theme.themeBean">
> <id name="ID" column="ThemeID" type="numeric"/>
> <property name="Title" type="string"/>
> <property name="UniqueName" type="string"/>
> <property name="Colour" type="string"/>
> <onetomany name="StarRating" lazy="true">
> <link to="stories.booktheme" column="ThemeID" />
> <collection type="array">
> <order property="StarRating" order="desc" />
> </collection>
> </onetomany>
> </object>
> <!--- This function is in the ThemeBean --->
> <cffunction name="getBookArray" access="public" returntype="array">
> <cfset var aStarRating = getStarRatingArray() />
> <cfset var aBooks = [] />
> <cfset var thisStarRating = '' />
> <cfloop array="#aStarRating#" index="thisStarRating">
> <cfif thisStarRating.hasParentBook()>
> <cfset ArrayAppend(aBooks,thisStarRating.getParentBook())>
> </cfif>
> </cfloop>
> <cfreturn aBooks />
> </cffunction>
> Stephen
> >
>



-- 
E: [email protected]
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to