About @VariableOneToOne Mapping

View: New views
2 Messages — Rating Filter:   Alert me  

About @VariableOneToOne Mapping

by onur.aktas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

VariableOneToOne mapping is the reason why i switched from Hibernate to EclipseLink. However i'm facing with some performance problems with @VariableOneToOne mappings.

1) I can not "LEFT JOIN"
2) I can not retrieve discriminated objects without using FetchType-EAGER
3) I can not filter "TYPE" column as the example schema structure below.

My schema is something like that:
TableProcess:
ID  - TYPE - VEHICLE_ID
TableCar:
ID - NAME
TablePlane:
ID - NAME

Thanks for your helps.
Regards

Re: About @VariableOneToOne Mapping

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1) EclipseLink does not support joining variable relationships, please add this enhancement request to Bugzilla.  As a workaround you should be able to define (multiple) OneToOneQueryKey that you can (left) join on.
2) Not sure what you mean here, lazy should work with VariableOneToOne, perhaps elaborate and include what config your are using and what error you are getting?
3) You can set the type indicator using the discriminatorColumn and discriminatorClasses attributes.  Perhaps include the config you are using and error you are getting.


onur.aktas wrote:
Hi,

VariableOneToOne mapping is the reason why i switched from Hibernate to EclipseLink. However i'm facing with some performance problems with @VariableOneToOne mappings.

1) I can not "LEFT JOIN"
2) I can not retrieve discriminated objects without using FetchType-EAGER
3) I can not filter "TYPE" column as the example schema structure below.

My schema is something like that:
TableProcess:
ID  - TYPE - VEHICLE_ID
TableCar:
ID - NAME
TablePlane:
ID - NAME

Thanks for your helps.
Regards