Added the part of the sql that will retrieve all the data from the entity.  I have quite a mess going here... will need to clean it up.