Apr 5
It seems like Coldfusion 9 Cumulative Hot Fix 1 broke all my Mach-ii apps! Spent a day trying to debug everything rolling back my changes,
updating Mach-II etc. just to find out it was the hot fix!
Was getting all kind of weird errors on dependency injection from coldspring. I use CF ORM as well.
I'm glad I did the update only on my local machine.
Any one else seen it? All is well now that I removed the hot fix...
Update:
This has been verified by Adobe (Bug # 82621). Here is the response from one of Adobe Engineer:
"Engineering was able to reproduce the issue you have reported and found that this issue is same as another bug we fixed recently. Bug – 82504. This bug is also caused because of regression with CHF 1. We are planning to release this bug fix along with CHF 2"
Keywords: No Parent error, CHF 1
Mar 4
I'm still trying to wrap my head around the relationships in ORM. Yesterday I wanted to delete all the child entities with the parent is delete. No problem, there is an attribute for that. cascade="all-delete-orphan". Well, it wasn't working for me.
It turned out, in my Mach-II app I was using event-bean (by mistake) to prepare the bean and then calling EntityDelete() on it. The entity was getting deleted but the child entities were not getting deleted. No error either. Once I realized my mistake (event-bean), and changed to call-method to load the entity and then call entityDelete() on it everything worked fine.
So, what is the bug? Here is the code equivalent (artist-art example) of my mumbo-jumbo above:
Read more...
Jan 18
I had an interesting observation about datatype conversion in CF9 when dealing with an error in ORM. I was getting an error that said can't use double for an integer field type (something like that). Now, I know that ColdFusion is datatype "independent". So, all simple variables are of datatype "String". Given that, when we do:
Read more...
Nov 10
ColdFusion's built in function getTimeZoneInfo() doesn't allow you to pass a date. It give you the server timezone info and offset as of "now" (as in, when the code is run).
If you need to find the timezone offset for a specific date, you can use the TimeZone class from java. Here is the code.
<cfset myDate = "11/01/09" />
<cfset timeZone = createObject("java","java.util.TimeZone") />
<cfset myTimeZone = timeZone.getTimeZone("America/New_York") />
<cfset myTimeZoneOffset = myTimeZone.getOffset(1,year(myDate),month(myDate),day(myDate),dayOfWeek(myDate),0) />
Nov 10
I'm slowly migrating to writing script style components. I really started loving it. It's lot faster to write code in script style.
Anyway, today in one of my component I wanted to define the type of a property as a custom class. Since you can't write any code above property definition, on a whim, I tried the import outside of the component declaration and I was pleasantly surprised that it worked as expected!
import someClassPath.*;
component {
property MyClassName myClass;
public void function init() {
return this;
}
}
Recent Comments