Dear List members,

sorry for reposting my question but I still couldn't find a solution for
this problem.

I experienced a strange problem while combining Beaneditor annotations
with objects fetched through a lazy OneToOne association.
Beaneditor annotations on setter methods like
(@DataType(value="longtext") or @NonVisual) gets ignored when the
OneToOne association is lazy fetched (fetch=FetchType.LAZY). Annotations
on getter methods (like @Validate("required")) are working probably.
Eager fetching the association solves this issue but is unfortunately no
option due to a complex data scheme.

The data scheme looks like this:

MainClassA  --> DataClassB
            --> DataClassC
            --> DataClassD
            etc.

MainClassA has a number of OneToOne associations. Each of these
associated data classes are simple POJOs which will get edited/displayed
by beaneditor-/display components.

Here is an example of our OneToOne association:

@OneToOne(cascade={CascadeType.PERSIST,
                  CascadeType.MERGE,    
                  CascadeType.REMOVE},
          optional=false)
@Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
@JoinColumn(name="classB_fk", unique=true )
public DataClassB getDataClassBData() {

        //do something  
}

If I switched to lazy fetching like this

@OneToOne(cascade={CascadeType.PERSIST,
                  CascadeType.MERGE,    
                  CascadeType.REMOVE},
          optional=false,
          fetch=FetchType.LAZY)

the problem occur.

I do use T5.1.0.5 and Hibernate 3.3.1GA

Thanks in advance ....

Cheers
Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to