• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to refresh ...

 
mihran eprem
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
my problem is that i have a big database schema that is should map my entities on it
the schema contain tables and database views (the database design i cant change )
i mapped one entity in one of the database views its worked fine (of course its not updateable )
then i map another entity to a database table that related on previous database view (its updateable)
when i update the entity and merge it
the first entity still contain the old values

i cant use manual em.refresh() , because the is a lot of records (more than 25000)

any solution any idea

tnx

i tried to use em listeners ...don't work
i tried to put cascade merge ...don't work


 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to execute another call to get the view data.

Also, if caching is involved, in case the update connection and view connection uses different connections (or hibernate setups), the view call to get data should not be cached (this can be an issue you need to resolve especially if huge data is involved). If they are together (the view and update calls) in the same hibernate setup, and the view is cached, the update must refresh/clear the cache when update is called.
 
mihran eprem
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for for your information
but there is some point that is should clarified
1-im using ejb 3
2- deploy on weblogic
3 my data base is oracle 11g
4 yes all the entities use the same database connection

can i disable the cash for on entity ???
 
Leslie White
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

In persistence.xml try this: <shared-cache-mode>NONE</shared-cache-mode> or can be selectively enabled/disabled using the @Cache annotation on entity.


flaccy
 
mihran eprem
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
i try it and its worked so good
thank you again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic