How can create a view just one time in java projects? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How can create a view just one time in java projects?

When we create persistence.xml file and when call EntityManagerFactory, the database create with all tables. But where and when we can create view in database? I need create just one time like tables.

3rd May 2020, 7:53 PM
hamid
hamid - avatar
2 Respostas
0
You can create the database view and use JPA to map to that view with the @Table annotation just like you would do with an existing table.
3rd May 2020, 9:14 PM
Tashi N
Tashi N - avatar
0
but my view columns come from many tables.
4th May 2020, 6:21 AM
hamid
hamid - avatar