Reputation: 1475
I have some event table whose data keeps getting changed everyday. I want to design a view for every month/every fixed number of days. When I want to create a new view, I want to append the end date to the name of the previous view. I'm supposed to go with views only, since that is the requirement I'm given. My views contain the records of that month or those many days. My table will contain all the columns that are in the original table. I've several questions here:
I've found the link to handle views https://glenware.wordpress.com/2015/12/15/creating-custom-spring-data-jpa-repositories/
Upvotes: 0
Views: 618
Reputation: 1905
The blog post you included shows you how to map to views. I get the impression you want this to be dynamic - but i dont think this is possible. It may be possible using some fancy cglib - but i dont think its practical
Not possible except through recompiling
I think your best bet is to write queries, or a native query
Upvotes: 1