cfdump ER you may want to vote for

This post is more than 2 years old.

This has been bugging me for a while but I finally got around to logging a bug for it. If you agree with the following, please vote for it here. (And note - I accidentally filed it as a bug. To be clear, this is an ER, not a bug.) When dumping an entity, if my entity contains child entities, the dump can end up being huge. So for example, consider a Group entity that has a Members property. That could contain 200 members. If I dump the Group most likely I'll end up getting a timeout error. That really isn't a bug per se it's just ColdFusion trying to output a ginormous amount of HTML. cfdump does provide a TOP attribute, but that tends to be too restrictive. If I had a list of Groups perhaps and I didn't like how the Members were too big, using top=2 for example would restrict both the list of members but also the list of Groups.

What I thought may make sense (and what ER 86367 tries to describe), is the ability to suppress display of child entities. Given you are dumping parent object X, I'd like to tell the tag that any children of X that are entities should be suppressed. Ideally their class name only should be printed.

What do you think? Writing it out it seems kind of dumb. But I feel like I run into this every day almost when working with ORM.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Bob Chesley posted on 2/15/2011 at 7:55 PM

Totally agree! Maybe it's just old habits die hard but seems like every time I start debugging an ORM project I have to forget this once.

Comment 2 by John Allen posted on 2/15/2011 at 8:50 PM

I also run into this EVERYDAY. I have gotten into the habit of adding top="1" and checking arrayLens of related entities if needed, but I agree that suppressing children would be very helpful for day to day development. With the upgrades to cfdump in 9 this would be another welcomed enhancement.