[Teneo] Multi-column join? [message #106805] |
Mon, 14 January 2008 18:47  |
Eclipse User |
|
|
|
I haven't updated my version of Teneo in a while. My client has decided
that they really need to support of horribly written old tables and now
they're coming up to a multi-column join problem.
We looked into the code, it looks like the multiple column join is
specifically not supported. Do you know if it would be very hard to add
support for it? Any suggestions about what would need to be done to
support it. (I.E. is it something I could do myself relatively quickly?)
Thanks for any advice,
Jason
---------------------------------------------
public class ManyToOneMapper
extends AbstractAssociationMapper
implements ExtensionPoint {
public void process(PAnnotatedEReference paReference) {
log.debug("Process many-to-one " + paReference);
final List<JoinColumn> jcs = getJoinColumns(paReference);
if (jcs.size() > 1) { // TODO support multiple join columns
log.error("Unsupported multiple join columns in " + paReference);
throw new MappingException("Unsupported multiple join columns",
paReference);
}
..
..
..
|
|
|
Re: [Teneo] Multi-column join? [message #106835 is a reply to message #106805] |
Tue, 15 January 2008 01:08   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090904020207090004090706
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi Jason,
I have a testcase which shows support for composite ids and multiple join columns (see the attached
ecore and then the children collection in parent).
Or do you mean something else?
gr. Martin
jason henriksen wrote:
>
> I haven't updated my version of Teneo in a while. My client has decided
> that they really need to support of horribly written old tables and now
> they're coming up to a multi-column join problem.
>
> We looked into the code, it looks like the multiple column join is
> specifically not supported. Do you know if it would be very hard to add
> support for it? Any suggestions about what would need to be done to
> support it. (I.E. is it something I could do myself relatively quickly?)
>
> Thanks for any advice,
>
> Jason
>
> ---------------------------------------------
>
> public class ManyToOneMapper
> extends AbstractAssociationMapper
> implements ExtensionPoint {
>
> public void process(PAnnotatedEReference paReference) {
> log.debug("Process many-to-one " + paReference);
>
> final List<JoinColumn> jcs = getJoinColumns(paReference);
> if (jcs.size() > 1) { // TODO support multiple join columns
> log.error("Unsupported multiple join columns in " + paReference);
> throw new MappingException("Unsupported multiple join columns",
> paReference);
> }
> ..
> ..
> ..
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
--------------090904020207090004090706
Content-Type: text/xml;
name="compositeid.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="compositeid.ecore"
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="compositeid"
nsURI="http:///org/elver/samples/emf/annotations/compositeid.ecore" nsPrefix="org.eclipse.emf.teneo.samples.emf.annotations.compositeid ">
<eClassifiers xsi:type="ecore:EClass" name="Parent" eSuperTypes="#//Person">
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//Child">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value=" @JoinColumns({
	@JoinColumn(name="m yParentFirstName", referencedColumnName="firstName"),
 ;	@JoinColumn(name="myParentLastName&qu ot;, referencedColumnName="lastName"),
 }) "/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Child" eSuperTypes="#//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Person">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value=" @IdClass(org.eclipse.emf.teneo.samples.emf.annotations.compo siteid.PersonID) "/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@Id"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@Id"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>
--------------090904020207090004090706--
|
|
|
|
|
Re: [Teneo] Multi-column join? [message #107621 is a reply to message #107608] |
Fri, 18 January 2008 01:30  |
Eclipse User |
|
|
|
Hi Jason,
Check in has been done. You should do a cvs update for most projects as I also cleaned up an
internal api which resulted in a number of smaller changes in various locations.
I have added a description of the solution in the bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215635
This description will be added to the docs also.
gr. Martin
Martin Taal wrote:
> Okay thanks, I will check in the solution early tomorrow morning
> (netherlands timezone).
>
> gr. Martin
>
> jason henriksen wrote:
>> Just heads up that I added those XSDs to the bug,
>>
>> Jason
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo] Multi-column join? [message #613986 is a reply to message #106805] |
Tue, 15 January 2008 01:08  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090904020207090004090706
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi Jason,
I have a testcase which shows support for composite ids and multiple join columns (see the attached
ecore and then the children collection in parent).
Or do you mean something else?
gr. Martin
jason henriksen wrote:
>
> I haven't updated my version of Teneo in a while. My client has decided
> that they really need to support of horribly written old tables and now
> they're coming up to a multi-column join problem.
>
> We looked into the code, it looks like the multiple column join is
> specifically not supported. Do you know if it would be very hard to add
> support for it? Any suggestions about what would need to be done to
> support it. (I.E. is it something I could do myself relatively quickly?)
>
> Thanks for any advice,
>
> Jason
>
> ---------------------------------------------
>
> public class ManyToOneMapper
> extends AbstractAssociationMapper
> implements ExtensionPoint {
>
> public void process(PAnnotatedEReference paReference) {
> log.debug("Process many-to-one " + paReference);
>
> final List<JoinColumn> jcs = getJoinColumns(paReference);
> if (jcs.size() > 1) { // TODO support multiple join columns
> log.error("Unsupported multiple join columns in " + paReference);
> throw new MappingException("Unsupported multiple join columns",
> paReference);
> }
> ..
> ..
> ..
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
--------------090904020207090004090706
Content-Type: text/xml;
name="compositeid.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="compositeid.ecore"
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="compositeid"
nsURI="http:///org/elver/samples/emf/annotations/compositeid.ecore" nsPrefix="org.eclipse.emf.teneo.samples.emf.annotations.compositeid ">
<eClassifiers xsi:type="ecore:EClass" name="Parent" eSuperTypes="#//Person">
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//Child">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value=" @JoinColumns({
	@JoinColumn(name="m yParentFirstName", referencedColumnName="firstName"),
 ;	@JoinColumn(name="myParentLastName&qu ot;, referencedColumnName="lastName"),
 }) "/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Child" eSuperTypes="#//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Person">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value=" @IdClass(org.eclipse.emf.teneo.samples.emf.annotations.compo siteid.PersonID) "/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@Id"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@Id"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>
--------------090904020207090004090706--
|
|
|
|
Re: [Teneo] Multi-column join? [message #614042 is a reply to message #107581] |
Thu, 17 January 2008 18:28  |
Eclipse User |
|
|
|
Okay thanks, I will check in the solution early tomorrow morning (netherlands timezone).
gr. Martin
jason henriksen wrote:
> Just heads up that I added those XSDs to the bug,
>
> Jason
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo] Multi-column join? [message #614043 is a reply to message #107608] |
Fri, 18 January 2008 01:30  |
Eclipse User |
|
|
|
Hi Jason,
Check in has been done. You should do a cvs update for most projects as I also cleaned up an
internal api which resulted in a number of smaller changes in various locations.
I have added a description of the solution in the bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215635
This description will be added to the docs also.
gr. Martin
Martin Taal wrote:
> Okay thanks, I will check in the solution early tomorrow morning
> (netherlands timezone).
>
> gr. Martin
>
> jason henriksen wrote:
>> Just heads up that I added those XSDs to the bug,
>>
>> Jason
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.04004 seconds