Hi,
I managed to get this to work w/ some slight changes to the syntax:
BAD (wasn't working)
Quote:
session.createSQLQuery("select {f.*}"
+
" from folder f connect by " +
"prior parent_folder_id = folder_id " +
"start with folder_id = " + childId).addEntity(SimpleFolder.class).list();
GOOD (worked)Quote:
session.createSQLQuery("select {folder.*} " +
" from FOLDER {folder} connect by " +
"prior parent_folder_id = folder_id " +
"start with folder_id = :folderId" )
.addEntity("folder",SimpleFolder.class)
.setLong("folderId", folder.getLongValue()).list();
Hope that helps.