in Education by
new to play and just trying to follow the video on: http://www.playframework.org/ I'm coming so far that i want to create the list of tasks after creating the Task-class. I when i reload i get this error: "UsupportedOperationException occured : Please annotate your JPA model with @javax.persistence.Entity annotation." I'm using Eclipse. Also note that i have changed tasks to be persons in: My Person model/class-defination in Person.java package models; import play.*; import play.db.jpa.*; import javax.persistence.*; import java.util.*; public class Person extends Model{ public String title; public boolean done; public Person(String title){ this.title = title; } } And application.java: package controllers; import play.*; import play.mvc.*; import java.util.*; import models.*; public class Application extends Controller { public static void index() { List persons = Person.find("order by id desc").fetch(); render(persons); } } The error is connected with this line: List persons = Person.find("order by id desc").fetch(); JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Add @Entity to the top of the model class.

Related questions

0 votes
    Explain @javax.ejb.PostActivate annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.ActivationConfigProperty annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.Remote annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.Local annotation...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.EJB annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.MessageDrivenBean annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.Stateful annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.Stateless annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    I am trying to create a simple node.js app on heroku. Here is app.js: console.log("Starting App" ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    After reading up on some options (sqlite, derby etc...), I've decided to throw down with HSQLDB. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    In my Mongo Helm Chart, I am using PVC for Persistence volume. I am using the chart to install ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    In my Mongo Helm Chart, I am using PVC for Persistence volume. I am using the chart to install ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 27, 2022 in Education by JackTerrance
0 votes
    Explain annotation in EJB to do the database entity relationships/mappings....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    App permissions can cause trouble as some apps may secretly access your memory card or contact data. (a) ... -for-Cyber Security:,Cyber Security-Jobs:,Cyber Security Applications...
asked Nov 1, 2021 in Education by JackTerrance
...