Post (id, title, summary, content ...)
Comment(id, title, content, postId ...)
Do you know how to do the query in plain sql?
?SEVERE: Servlet.service() for servlet [jsp] in context with path [/BlogApp] threw exception [Unable to compile class for JSP:
An error occurred at line: [41] in the generated java file: [/home/vladimir/javatools/apache-tomee-plus-1.5.2/work/Catalina/localhost/BlogApp/org/apache/jsp/home_jsp.java]
This method must return a result of type Map<String,Long>
An error occurred at line: [203] in the generated java file: [/home/vladimir/javatools/apache-tomee-plus-1.5.2/work/Catalina/localhost/BlogApp/org/apache/jsp/home_jsp.java]
This method must return a result of type boolean
Vladimir Razov wrote:Same thing when using 'foreach'.
You need to pass a second parameter Post.class to the method createNativeQuery to get a List<Post>
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |