Search code examples
coldfusioncoldfusion-11

How to limit size of cfdump for entities


Is there away to limit size of cfdump when we're dumping an ORM entity? It seems that cfdump will try to load and display ALL entities related/associated to (as defined in many-to-one or one-to-many relationships) the entity being dumped. Sometimes dumping one single entity can lead to an output of more than 100mb (that's megabytes).


Solution

  • According to the documentation, it looks like what you are looking for is the top parameter.

    <cfdump  
        var = "#variable#" 
        output = "browser|console|file" 
        format = "text|html" 
        abort = "true|false"> 
        label = "text" 
        metainfo = "yes|no" 
        top = "number of rows|number of levels" 
        show = "columns|keys" 
        hide = "columns|keys" 
        keys = "number of keys to display for structures" 
        expand = "yes|no"  
        showUDFs = "yes|no">
    

    top Optional 9999 The number of rows to display. For a structure, this is the number of nested levels to display.

    It's been a long time since I've used CFM, but you may also be interested in keys

    keys Optional 9999 For a structure, the number of keys to display.