当前位置:网站首页>Detach an entity from jpa/ejb3 persistence context
Detach an entity from jpa/ejb3 persistence context
2022-06-26 07:36:00 【French red wine sweet】
problem :
What would be the easiest way to detach a specific JPA Entity Bean that was acquired through an EntityManager. Separation pass EntityManager Get specific JPA Entity Bean What's the easiest way to do it .Alternatively, could I have a query return detached objects in the first place so they would essentially act as 'read only'? perhaps , Can I first have the query return a separate object , So that they basically act as “ read-only ”?
The reason why I want to do this is becuase I want to modify the data within the bean - with in my application only, but not ever have it persisted to the database. The reason I want to do this is because I want to modify bean Data in - Use only in my application , But it is never persisted to the database .In my program, I eventually have to call flush() on the EntityManager, which would persist all changes from attached entities to the underyling database, but I want to exclude specific objects. In my program , I finally have to EntityManager On the call flush(), This saves all changes from the attached entity to the underlying database , But I want to exclude certain objects .
Solution :
Reference resources : https://stackoom.com/en/question/8BC边栏推荐
- Solution to the problem of multi application routing using thinkphp6.0
- Web technology sharing | webrtc recording video stream
- Is it legal to open an account for compass stock trading software? Is it safe?
- MXNet对NIN网络中的网络的实现
- [UVM foundation] UVM_ Driver member variable req definition
- Nine hours, nine people and nine doors (01 backpack deformation) - Niuke
- Quickly find five channels for high-quality objects, quickly collect and avoid detours
- Crosslinked porphyrin based polyimide ppbpi-2, ppbpi-1-cr and ppbpi-2-cr; Porous porphyrin based hyperbranched polyimide (ppbpi-1, ppbpi-2) supplied by Qiyue
- Mxnet implementation of network in Nin network
- C#/. Net phase VI 01C Foundation_ 02:vs2019 basic operations, excluding code files, smart tips, data types, differences between float and double, and differences between string and string
猜你喜欢

Ppbpi-h-cr, ppbpimn Cr, ppbpi Fe Cr alkynyl crosslinked porphyrin based polyimide material Qiyue porphyrin reagent
![Meso tetra (4-bromophenyl) porphyrin (tbpp); 5,10,15,20-tetra (4-methoxy-3-sulfonylphenyl) porphyrin [t (4-mop) ps4] supplied by Qiyue](/img/83/ddbf296ac83f006f31cfd0bbbabe5e.jpg)
Meso tetra (4-bromophenyl) porphyrin (tbpp); 5,10,15,20-tetra (4-methoxy-3-sulfonylphenyl) porphyrin [t (4-mop) ps4] supplied by Qiyue

Redis系列——5种常见数据类型day1-3

C#/. Net phase VI 01C Foundation_ 02:vs2019 basic operations, excluding code files, smart tips, data types, differences between float and double, and differences between string and string
![Jemter stress test - Basic request - [teaching]](/img/f4/36dbd80e89d96e1121a6e2b92d1d07.png)
Jemter stress test - Basic request - [teaching]
![JMeter stress test web agent local interface test [teaching]](/img/6d/a8b3cd1ca55993fe59c066f95ef093.png)
JMeter stress test web agent local interface test [teaching]

Oracle中计算除法——解决除数为零报错

Google Earth Engine(GEE) 02-基本了解和学习资源

Attention mechanism yyds, AI editor finally bid farewell to P and destroyed the whole picture

The performance of iron and steel enterprises was expected to be good in January this year. Since February, the prices of products of iron and steel enterprises have increased significantly. A mighty
随机推荐
Solution to the permission problem when NPM install -g serve reports an error
Systemctl PHP configuration file
2021 project improvement
Xiaosha's counting (bit operation, Combinatorial Mathematics) - Niuke
What is Wi Fi 6 (802.11ax)? Why is Wi Fi 6 important?
This paper analyzes the use method and implementation principle of eventbus event bus
[SystemVerilog basics] post_ Randomize function record
JS event loop mechanism
安装homebrew报错汇总
Tsinghua Yaoban chendanqi won Sloan award! He is a classmate with last year's winner Ma Tengyu. His doctoral thesis is one of the hottest in the past decade
Yyds dry inventory kubernetes easy service discovery and load balancing (11)
Is it safe for individuals to buy stocks with compass software? How to buy stocks
Es string type (text vs keyword) selection
[UVM foundation] UVM_ Driver member variable req definition
Jemter stress test - visualization tool support - [installation]
Web technology sharing | webrtc recording video stream
Google Earth Engine(GEE) 01-中输入提示快捷键Ctrl+space无法使用的问题
The first multi platform webcast of 2021ccf award ceremony pays tribute to the winners! CCF outstanding engineer
Meso tetra (4-bromophenyl) porphyrin (tbpp); 5,10,15,20-tetra (4-methoxy-3-sulfonylphenyl) porphyrin [t (4-mop) ps4] supplied by Qiyue
Machine learning - Iris Flower classification