implement query bound variables for RootOfTree queries
bugfix: remove redundant use of getSQLAdaptedString
Implement query bound variables for Attachment class