[jpa:25] Re: Hibernate EntityManager の使用感想
naoki
[E-MAIL ADDRESS DELETED]
2007年 4月 24日 (火) 16:59:29 JST
さとうです。
07/04/21 に Koichi Kobayashi<[E-MAIL ADDRESS DELETED]> さんは書きました:
> Proxy のクラス名が変わらなければデシリアライズ
> できるようになってますね.
JPA仕様では、同じJPAランタイム間でのLAZYなプロパティのデタッチ/マージを
サポートすることを要求していますね。
----------------------------------------------------------------------
3.2.4.2 Detached Entities and Lazy Loading
(snip...)
A vendor is required to support the serialization and subsequent
deserialization and merging of detached entity instances (which may
contain lazy properties or fields and/or relationships that have not
been fetched) back into a separate JVM instance of that vendor's runtime,
where both runtime instances have access to the entity classes and any
required vendor persistence implementation classes.
----------------------------------------------------------------------
> でもでも,クラス名が変わることは普通にありそう.
>
> 例えば Foo と Bar というエンティティがあって,Bar から
> Foo への関連が Proxy になってるとします (未ロード).
> Bar をセッションに保存して Tomcat を終了し,新たな
> エンティティ Baz を追加します.
Persistence Unitの内容に変更がある場合は、JPA仕様では
想定していないような気がします。仕様には、それをサポートするとも
しないとも書いていませんが。
jpa メーリングリストの案内