[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[dali-dev] implicit @Basic annotation and fetchType
|
Hi guys,
This may be a JPA runtime issue, but I thought I'd check with all you
intelligent folk here first :) Is an attribute that has no annotation treated
as a basic attribute (as if it had an assumed @Basic annotation)?
I thought that was the case, but I have a scenario where an EMP_PHOTO entity has
a byte array and is generated by Dali such as:
@Lob
private byte[] picture;
I execute a query that returns a list of EMP_PHOTOs, but for each instance, the
picture attribute is set to null. I assumed that the default fetch type should
be EAGER for that attribute. If I add the @Basic annotation:
@Lob
@Basic
private byte[] picture;
Then all of the picture attributes are filled properly. Is this behavior
expected? I am wondering if this is happening because the fetchType is only
being honored if the Basic annotation is set. It confused me because the Dali
JPA Details view was showing the fetchType as EAGER when I didn't have the
@Basic annotation, but the behavior wasn't corresponding to that until the
annotation was explicitly added. I'm not sure if this is a runtime bug, or just
how it is meant to work.
Thanks
Tom