code: public Map<String, Object> toMap(){
          Map<String, Object> retVal = new TreeMap<>();
          for (Map.Entry<String, Object> entry : attributes.entrySet()) {
              Object v = entry.getValue();
              if (v != null) {
                  if (v instanceof Clob) {
                      retVal.put(entry.getKey().toLowerCase(), Convert.toString(v));
                  } else {
                      retVal.put(entry.getKey().toLowerCase(), v);
                  }
              }
  
          }
          for(Entry<Class, Model> parent: cachedParents.entrySet()){
              retVal.put(underscore(parent.getKey().getSimpleName()), parent.getValue().toMap());
          }
  
          for(Entry<Class, List<Model>> cachedChild: cachedChildren.entrySet()){
              List<Model> children = cachedChild.getValue();
  
              List<Map> childMaps = new ArrayList<>(children.size());
              for(Model child:children){
                  childMaps.add(child.toMap());
              }
              retVal.put(tableize(cachedChild.getKey().getSimpleName()), childMaps);
          }
          return retVal;
      }
docs: Returns all values of the model with all attribute names converted to lower case,
  regardless how these names came from DB. This method is a convenience
  method for displaying values on web pages.
  
  <p></p>
  If {@link LazyList#include(Class[])} method was used, and this
  model belongs to a parent (as in many to one relationship), then the parent
  will be eagerly loaded and also converted to a map. Parents' maps are keyed in the
  returned map by underscored name of a parent model class name.
  <p></p>
  For example, if this model were <code>Address</code>
  and a parent is <code>User</code> (and user has many addresses), then the resulting map would
  have all the attributes of the current table and another map representing a parent user with a
  key "user" in current map.
  
  @return all values of the model with all attribute names converted to lower case.