RESTful web service to expose a database view-
I am using netbeans to develop a RESTful web service. I have a couple of database views, that I would like to expose through this service.开发者_如何学JAVA The creation wizard prompts this "You will likely need to specify Entity IDs for selected views (hit can be used)".
My views doesn´t actually have an ID but I still would like to find a way to retrieve them via RESTful. I have tried the netbeans tester unsuccessfully.
Any ideas? Many thanks.
I ever had this problem. I just added an annotation @Id on a specific field that I want to set to primary key. For example, if my class of view has some fields like: Number, Student, and ClassRoom. So I add an @Id annotation above the declaration of Number field if I want the Number field becomes a primary key. Hope this help
精彩评论