Thread: Tables In Ejb3
View Single Post
  #1 (permalink)  
Old 05-09-2007, 05:21 PM
Alan Alan is offline
Member
 
Join Date: May 2007
Posts: 39
Alan is on a distinguished road
Tables In Ejb3
Hello

I am working with EJB3 and I have the next doubt:
I have in my dbase 3 tables with the same structure (Mov2005, Mov2006 and Mov2007) and the records be inserted in these depending of the year in the date of the movement.


they all have the same structure, the ideal thing would be create the only entity that administers the information, but here my great worry comes and is how I say to to the EntityManager that it should insert in certain table depending the year of the movement?

I have investigated and the only thing that I found is to create an entity for every table and to use CreateQuery to create the Dynamical sql, but this would imply that every year it is necessary to modify the application to create the entity. One thought of leaving the whole movement in the same table, but the volume of records per year is high and starts getting lost time of response.

Any suggestions?
Alan

Last edited by Alan : 06-01-2007 at 02:47 AM.
Reply With Quote
Sponsored Links