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>
The City calls upon her steadfast protectors. Now for a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|