I have found that there is a curious behavior with the IsDeleted() method of the record factory.
The following code is deleting a record. This does not generate an error for the IsDeleted() method.
<cfscript>
Reactor = CreateObject("Component","reactor.reactorFactory").init(expandPath("reactor.xml"));
Region = Reactor.createRecord("Region").load(RegionID=5);
Region.delete();
Deleted = Region.IsDeleted();
</cfscript>
The following shorthand version does cause an error.
<cfscript>
Reactor = CreateObject("Component","reactor.reactorFactory").init(expandPath("
reactor.xml"));
Region = Reactor.createRecord("Region").delete(RegionID=5);
Deleted = Region.IsDeleted();
</cfscript>
If I do not have a load() method prior to the IsDeleted() check, an error
is generated. I suspect the shorthand notation deconstructs the region
record object and therefore does not provide the IsDeleted() method a valid
object to reference.
Is this a bug? Or is this just how the IsDeleted() behaves and requires the prerequisite of a load()?
Thanks,
--
<cf_payne />
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- [Reactor for CF] IsDeleted() Teddy Payne
- RE: [Reactor for CF] IsDeleted() Doug Hughes
- Re: [Reactor for CF] IsDeleted() Teddy Payne

