persistence@glassfish.java.net

Understanding of Static Weaving

From: Adam Bien <abien_at_adam-bien.com>
Date: Mon, 19 Nov 2007 15:08:23 +0100

Hi All,

it seems like in the following scenario:

@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
    private Detail lazyDetail;

    @OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
    private Detail eagerDetail;

the weaver (Ant-Task) ignores the FetchType.EAGER and processes the
"eagerDateil" relation as well.
We encountered some problems in the application and found both relations
with the "weaved" indirection (I attached the screenshot).
In my opinion the weaver should only process "LAZY" attributes?

Any thoughts?

thank you in advance,

adam



-- 
 Consultant, Author, Java Champion
 
 Homepage: www.adam-bien.com
 Weblog: blog.adam-bien.com
 eMail:  abien_at_adam-bien.com
 Mobile: 0049(0)170 280 3144
 Books: Enterprise Architekturen (ISBN: 393504299X),
        Java EE 5 Architekturen  (ISBN: 3939084247),
        J2EE Patterns, J2EE Hotspots, Enterprise Frameworks and Struts
   




static_weaving.JPG
(image/jpeg attachment: static_weaving.JPG)