Aug 6
So, it's great to have mappedsuperclass implementation in CF 9.0.1, but it's certainly half baked. Earlier I posted about issues related to DDL creation with mappedsuperclass and one-to-one relationship. Once I got past that one, I stumbled upon another issue. If the persistent component doesn't have any properties then the methods of mappedsuperclass are not returned in the metadata (as top level struct).
So, in my previous example I had:
Data.cfc
ExtraData.cfc (persistent, no property, extends ExtraDataBase)
ExtraDataBase.cfc (mappedsuperclass)
If I dump the metaData of ExtraData, here is what I get:

See how there is no struct key "functions" in the top level struct? Now here is what I get if I add a property foo in the ExtraData entity. You will see that now all the properties of mapped super class are available in the top level structs function key.

The reason I came across this is because I'm using Mach-ii. And they use metadata to populate beans. Which in the above case throws error when it tries to access the "functions" from the metadata.
Last few days it seems like most of my time is going in finding bugs. Hopefully we will get an update soon with these kinks resolved.
Keywords: ORM Coldfusion mappedsuperclass metadata mach-ii event-bean
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...
Recent Comments