Outer-join Support? - TopLink/JPA

Does toplink have outer-join support? If so, can you give a bried description of how it is setup/specified?
Thanks in advance. 

Does toplink have outer-join support? If so, can you give a bried description of how it is setup/specified?
Thanks in advance. Yup, instead of coding expBuilder.get("attr")... use getAllowingNull() or anyOfAllowingNone() for 1-M or M-M relationships.
-
Darren

Related

Problem: addPartialAttribute with one-to-many attribute ?

I have the problem when I use addPartialAttirubte (of ReadAllQuery) with one-to-many attribute. The query returns duplicate records. Does TopLink support this feature?
Thank you very much,
NB 
No, partial-attribute reading is not supported for 1-m relationships.
In the 10.1.3 preview, joining on 1-m relationships is now supported, but not partial-attributes.

group by clause in toplink

Hi everyone,
toplink support group by clause. if, yes. how.... 
TopLink supports group by when performing projections using ReportQuery.
See JavaDocs for ReportQuery.addGrouping(...).
Doug 
Thank you Doug but how to add the "having" clause after "group by" clause ?
Regards 
The having clause is not supported. This has been added through our JPA support in TopLink Essentials and is being implemented in Oracle TopLink for the next release.
For Oracle TopLink in 10.1.3 you will need to custom SQL to leverage HAVING.
Doug 
Thank you Doug,
have you an "approximate" date for release of this next version of toplink (having in toplink native expression).
Best regards

CadcadeType parallel in workbench

hi,
can anybody tell me what's the parallel workbench attribute/behaviour for each CascadeType in JPA?
I understand CascadeType.REMOVE - if the parent is removed than so is the child.
What are the others?
I'm also looking for the parallel to ValueHolder.
Thanks,
yasmin 
The closest thing to a ValueHolder in JPA is FetchType LAZY.

Delete few child objects of One to Many relation.

Hi
we have the follwoing relation. Employee -> Addresses
One employe is having 5 addresses.
Now we need to delete 2 addresses for this employee.
Can any one suggest the best way to do this in my java program.
regards
Ram kumar 
Are you using JPA or the native TopLink API?
Either remove them from the Employee then call deleteObject/remove on them. Or mark the relationship as privateOwned in TopLink and just remove them.
-- James : http://www.eclipselink.org 
Hi James,
Thanks for the response. We are using Toplink API.
Could you help us on how to declare the relationship as PrivateOwned in toplink.
and also any code snippet to remove object.
regards
Ram Kumar. 
On the mapping (ForeignReferenceMapping and subclasses) call the method setIsPrivateOwned(true). If you are using the Mapping Workbench there is also a checkbox for this in the mapping UI.

How to manage Many-to-one?

Hi,
I'm new in Toplink and I've studied the documentation and noticed from what I could see that it doesn't support Many-to-one relations (or does it).
Is there any way a relation of this kind can be solved in Toplink? Perhaps it have its own solution?
Best regards
Newman 
A One-to-Many mapping from the far end should do fine. 
Newman,
In TopLink a 1:1 mapping is simply used for both the 1:1 and M:1 scenarios. When using it in the M:1 scenario you should simply not configure it to use the foreign key on target or the privately-owned setting.
Additionally in a M:1 scenario if you were to have a bi-directional or back reference it should be a 1:M as the other poster mentioned.
Cheers,
Doug

Categories

Resources