Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » teneo - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect
teneo - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect [message #57707] Mon, 16 October 2006 17:55 Go to next message
Andre Pareis is currently offline Andre PareisFriend
Messages: 113
Registered: July 2009
Senior Member
Hi,

if I set the persistence option "none" to SQL_CASE_STRATEGY, then all
table and column names are create in capitals. I have debugged and have
seen that at the relevant code pieces a .toUppercase() always takes place.

I have removed the toUppercase() calls and then the "none" option worked
for me.

Regards,
Andre
Re: teneo - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect [message #57734 is a reply to message #57707] Mon, 16 October 2006 18:06 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Andre,
Thanks for letting me know. In which places did you remove the toUpperCase()?

Btw, related to the other exception you got (with the log4j.PropertyConfigurator). I can now
reproduce it.
There appears to be a difference between the builds distributed through the update manager (which
fail with this error) and the directly downloadable zip files (which work).
I have entered a bugzilla for this exception.

gr. Martin

Andre R. Pareis wrote:
> Hi,
>
> if I set the persistence option "none" to SQL_CASE_STRATEGY, then all
> table and column names are create in capitals. I have debugged and have
> seen that at the relevant code pieces a .toUppercase() always takes place.
>
> I have removed the toUppercase() calls and then the "none" option worked
> for me.
>
> Regards,
> Andre


--

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 - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect [message #57759 is a reply to message #57734] Mon, 16 October 2006 19:19 Go to previous messageGo to next message
Andre Pareis is currently offline Andre PareisFriend
Messages: 113
Registered: July 2009
Senior Member
Hi Martin,

Thanks for updating me regarding the discrepancy between ZIP and the UM.
I was getting more and more paranoid as you kept telling me that your
callisto was fine and I had no explaination why mine behaved completely
different. BTW I always had to unselect the documentation plugin,
because if I didn't then the whole update failed with a general error -
can you confirm that this is normal or not?

And here is a patch about my changes in the DefaultAnnotator against the
CVS head. I did these changes quite quickly without checking what the
code does, solely based on the stack trace in the debugger when calls to
None.convert() happened. So the changes might be specific to my model
which does not use FeatureMaps and other more advanced ecore stuff.

Thanks
Andre



### Eclipse Workspace Patch 1.0
#P org.eclipse.emf.teneo.annotations
Index: src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
============================================================ =======
RCS file:
/cvsroot/technology/org.eclipse.emft/teneo/plugins/org.eclip se.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotatio ns/mapper/DefaultAnnotator.java,v
retrieving revision 1.6
diff -u -r1.6 DefaultAnnotator.java
--- src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
29 Sep 2006 12:46:33 -0000 1.6
+++ src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
16 Oct 2006 19:11:24 -0000
@@ -296,7 +296,7 @@
final String idFeature = (String) it.next();
final PrimaryKeyJoinColumn pkjc =
aFactory.createPrimaryKeyJoinColumn();
final String colName = superClass.getName() + "_" + idFeature;
- pkjc.setName(trunc(colName.toUpperCase(), true));
+ pkjc.setName(trunc(colName, true));
aClass.getPrimaryKeyJoinColumns().add(pkjc);
}
}
@@ -308,10 +308,10 @@
.equals(InheritanceType.JOINED_LITERAL)))) {
final Table table = aFactory.createTable();
table.setEModelElement(eclass);
- table.setName(trunc(eclass.getName().toUpperCase(), false));
+ table.setName(trunc(eclass.getName(), false));
aClass.setTable(table);
} else if (aClass.getTable() != null && aClass.getTable().getName()
== null) {
- aClass.getTable().setName(trunc(eclass.getName().toUpperCase (), false));
+ aClass.getTable().setName(trunc(eclass.getName(), false));
}

// if the strategy is all classes of one hierarchy in one table and
this is not the superclass
@@ -1067,7 +1067,7 @@
} else {
jcName = aClass.getAnnotatedEClass().getName() + "_" + name;
}
- jc.setName(trunc(jcName.toUpperCase(), true));
+ jc.setName(trunc(jcName, true));
jc.setNullable(optional);
jc.setUpdatable(isUpdateInsertable);
jc.setInsertable(isUpdateInsertable);


Martin Taal schrieb:
> Hi Andre,
> Thanks for letting me know. In which places did you remove the
> toUpperCase()?
>
> Btw, related to the other exception you got (with the
> log4j.PropertyConfigurator). I can now reproduce it.
> There appears to be a difference between the builds distributed through
> the update manager (which fail with this error) and the directly
> downloadable zip files (which work).
> I have entered a bugzilla for this exception.
>
> gr. Martin
>
> Andre R. Pareis wrote:
>
>> Hi,
>>
>> if I set the persistence option "none" to SQL_CASE_STRATEGY, then all
>> table and column names are create in capitals. I have debugged and
>> have seen that at the relevant code pieces a .toUppercase() always
>> takes place.
>>
>> I have removed the toUppercase() calls and then the "none" option
>> worked for me.
>>
>> Regards,
>> Andre
>
>
>
Re: teneo - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect [message #57783 is a reply to message #57759] Mon, 16 October 2006 19:51 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Andre,
Thanks for the patch your changes seem logical. I have also removed some other toUpperCases and
committed the change.

Yes the issue with the documentation plugin is correct. The error is actually that the documentation
plugin is not present on the update manager site (it is a basic http 404 error). Currently it is
unclear for me why the eclipse emft build does not pick it up and I do not know why the update
manager lists it while the jar file is not there. I (we) are looking at it though.

gr. Martin

Andre Pareis wrote:
> Hi Martin,
>
> Thanks for updating me regarding the discrepancy between ZIP and the UM.
> I was getting more and more paranoid as you kept telling me that your
> callisto was fine and I had no explaination why mine behaved completely
> different. BTW I always had to unselect the documentation plugin,
> because if I didn't then the whole update failed with a general error -
> can you confirm that this is normal or not?
>
> And here is a patch about my changes in the DefaultAnnotator against the
> CVS head. I did these changes quite quickly without checking what the
> code does, solely based on the stack trace in the debugger when calls to
> None.convert() happened. So the changes might be specific to my model
> which does not use FeatureMaps and other more advanced ecore stuff.
>
> Thanks
> Andre
>
>
>
> ### Eclipse Workspace Patch 1.0
> #P org.eclipse.emf.teneo.annotations
> Index: src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
> ============================================================ =======
> RCS file:
> /cvsroot/technology/org.eclipse.emft/teneo/plugins/org.eclip se.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotatio ns/mapper/DefaultAnnotator.java,v
>
> retrieving revision 1.6
> diff -u -r1.6 DefaultAnnotator.java
> --- src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
> 29 Sep 2006 12:46:33 -0000 1.6
> +++ src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
> 16 Oct 2006 19:11:24 -0000
> @@ -296,7 +296,7 @@
> final String idFeature = (String) it.next();
> final PrimaryKeyJoinColumn pkjc =
> aFactory.createPrimaryKeyJoinColumn();
> final String colName = superClass.getName() + "_" +
> idFeature;
> - pkjc.setName(trunc(colName.toUpperCase(), true));
> + pkjc.setName(trunc(colName, true));
> aClass.getPrimaryKeyJoinColumns().add(pkjc);
> }
> }
> @@ -308,10 +308,10 @@
> .equals(InheritanceType.JOINED_LITERAL)))) {
> final Table table = aFactory.createTable();
> table.setEModelElement(eclass);
> - table.setName(trunc(eclass.getName().toUpperCase(), false));
> + table.setName(trunc(eclass.getName(), false));
> aClass.setTable(table);
> } else if (aClass.getTable() != null &&
> aClass.getTable().getName() == null) {
> -
> aClass.getTable().setName(trunc(eclass.getName().toUpperCase (), false));
> + aClass.getTable().setName(trunc(eclass.getName(), false));
> }
>
> // if the strategy is all classes of one hierarchy in one table
> and this is not the superclass
> @@ -1067,7 +1067,7 @@
> } else {
> jcName = aClass.getAnnotatedEClass().getName() + "_" +
> name;
> }
> - jc.setName(trunc(jcName.toUpperCase(), true));
> + jc.setName(trunc(jcName, true));
> jc.setNullable(optional);
> jc.setUpdatable(isUpdateInsertable);
> jc.setInsertable(isUpdateInsertable);
>
>
> Martin Taal schrieb:
>> Hi Andre,
>> Thanks for letting me know. In which places did you remove the
>> toUpperCase()?
>>
>> Btw, related to the other exception you got (with the
>> log4j.PropertyConfigurator). I can now reproduce it.
>> There appears to be a difference between the builds distributed
>> through the update manager (which fail with this error) and the
>> directly downloadable zip files (which work).
>> I have entered a bugzilla for this exception.
>>
>> gr. Martin
>>
>> Andre R. Pareis wrote:
>>
>>> Hi,
>>>
>>> if I set the persistence option "none" to SQL_CASE_STRATEGY, then all
>>> table and column names are create in capitals. I have debugged and
>>> have seen that at the relevant code pieces a .toUppercase() always
>>> takes place.
>>>
>>> I have removed the toUppercase() calls and then the "none" option
>>> worked for me.
>>>
>>> Regards,
>>> Andre
>>
>>
>>


--

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 - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect [message #594127 is a reply to message #57707] Mon, 16 October 2006 18:06 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Andre,
Thanks for letting me know. In which places did you remove the toUpperCase()?

Btw, related to the other exception you got (with the log4j.PropertyConfigurator). I can now
reproduce it.
There appears to be a difference between the builds distributed through the update manager (which
fail with this error) and the directly downloadable zip files (which work).
I have entered a bugzilla for this exception.

gr. Martin

Andre R. Pareis wrote:
> Hi,
>
> if I set the persistence option "none" to SQL_CASE_STRATEGY, then all
> table and column names are create in capitals. I have debugged and have
> seen that at the relevant code pieces a .toUppercase() always takes place.
>
> I have removed the toUppercase() calls and then the "none" option worked
> for me.
>
> Regards,
> Andre


--

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 - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect [message #594135 is a reply to message #57734] Mon, 16 October 2006 19:19 Go to previous message
Andre Pareis is currently offline Andre PareisFriend
Messages: 113
Registered: July 2009
Senior Member
Hi Martin,

Thanks for updating me regarding the discrepancy between ZIP and the UM.
I was getting more and more paranoid as you kept telling me that your
callisto was fine and I had no explaination why mine behaved completely
different. BTW I always had to unselect the documentation plugin,
because if I didn't then the whole update failed with a general error -
can you confirm that this is normal or not?

And here is a patch about my changes in the DefaultAnnotator against the
CVS head. I did these changes quite quickly without checking what the
code does, solely based on the stack trace in the debugger when calls to
None.convert() happened. So the changes might be specific to my model
which does not use FeatureMaps and other more advanced ecore stuff.

Thanks
Andre



### Eclipse Workspace Patch 1.0
#P org.eclipse.emf.teneo.annotations
Index: src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
============================================================ =======
RCS file:
/cvsroot/technology/org.eclipse.emft/teneo/plugins/org.eclip se.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotatio ns/mapper/DefaultAnnotator.java,v
retrieving revision 1.6
diff -u -r1.6 DefaultAnnotator.java
--- src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
29 Sep 2006 12:46:33 -0000 1.6
+++ src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
16 Oct 2006 19:11:24 -0000
@@ -296,7 +296,7 @@
final String idFeature = (String) it.next();
final PrimaryKeyJoinColumn pkjc =
aFactory.createPrimaryKeyJoinColumn();
final String colName = superClass.getName() + "_" + idFeature;
- pkjc.setName(trunc(colName.toUpperCase(), true));
+ pkjc.setName(trunc(colName, true));
aClass.getPrimaryKeyJoinColumns().add(pkjc);
}
}
@@ -308,10 +308,10 @@
.equals(InheritanceType.JOINED_LITERAL)))) {
final Table table = aFactory.createTable();
table.setEModelElement(eclass);
- table.setName(trunc(eclass.getName().toUpperCase(), false));
+ table.setName(trunc(eclass.getName(), false));
aClass.setTable(table);
} else if (aClass.getTable() != null && aClass.getTable().getName()
== null) {
- aClass.getTable().setName(trunc(eclass.getName().toUpperCase (), false));
+ aClass.getTable().setName(trunc(eclass.getName(), false));
}

// if the strategy is all classes of one hierarchy in one table and
this is not the superclass
@@ -1067,7 +1067,7 @@
} else {
jcName = aClass.getAnnotatedEClass().getName() + "_" + name;
}
- jc.setName(trunc(jcName.toUpperCase(), true));
+ jc.setName(trunc(jcName, true));
jc.setNullable(optional);
jc.setUpdatable(isUpdateInsertable);
jc.setInsertable(isUpdateInsertable);


Martin Taal schrieb:
> Hi Andre,
> Thanks for letting me know. In which places did you remove the
> toUpperCase()?
>
> Btw, related to the other exception you got (with the
> log4j.PropertyConfigurator). I can now reproduce it.
> There appears to be a difference between the builds distributed through
> the update manager (which fail with this error) and the directly
> downloadable zip files (which work).
> I have entered a bugzilla for this exception.
>
> gr. Martin
>
> Andre R. Pareis wrote:
>
>> Hi,
>>
>> if I set the persistence option "none" to SQL_CASE_STRATEGY, then all
>> table and column names are create in capitals. I have debugged and
>> have seen that at the relevant code pieces a .toUppercase() always
>> takes place.
>>
>> I have removed the toUppercase() calls and then the "none" option
>> worked for me.
>>
>> Regards,
>> Andre
>
>
>
Re: teneo - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect [message #594142 is a reply to message #57759] Mon, 16 October 2006 19:51 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Andre,
Thanks for the patch your changes seem logical. I have also removed some other toUpperCases and
committed the change.

Yes the issue with the documentation plugin is correct. The error is actually that the documentation
plugin is not present on the update manager site (it is a basic http 404 error). Currently it is
unclear for me why the eclipse emft build does not pick it up and I do not know why the update
manager lists it while the jar file is not there. I (we) are looking at it though.

gr. Martin

Andre Pareis wrote:
> Hi Martin,
>
> Thanks for updating me regarding the discrepancy between ZIP and the UM.
> I was getting more and more paranoid as you kept telling me that your
> callisto was fine and I had no explaination why mine behaved completely
> different. BTW I always had to unselect the documentation plugin,
> because if I didn't then the whole update failed with a general error -
> can you confirm that this is normal or not?
>
> And here is a patch about my changes in the DefaultAnnotator against the
> CVS head. I did these changes quite quickly without checking what the
> code does, solely based on the stack trace in the debugger when calls to
> None.convert() happened. So the changes might be specific to my model
> which does not use FeatureMaps and other more advanced ecore stuff.
>
> Thanks
> Andre
>
>
>
> ### Eclipse Workspace Patch 1.0
> #P org.eclipse.emf.teneo.annotations
> Index: src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
> ============================================================ =======
> RCS file:
> /cvsroot/technology/org.eclipse.emft/teneo/plugins/org.eclip se.emf.teneo.annotations/src/org/eclipse/emf/teneo/annotatio ns/mapper/DefaultAnnotator.java,v
>
> retrieving revision 1.6
> diff -u -r1.6 DefaultAnnotator.java
> --- src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
> 29 Sep 2006 12:46:33 -0000 1.6
> +++ src/org/eclipse/emf/teneo/annotations/mapper/DefaultAnnotato r.java
> 16 Oct 2006 19:11:24 -0000
> @@ -296,7 +296,7 @@
> final String idFeature = (String) it.next();
> final PrimaryKeyJoinColumn pkjc =
> aFactory.createPrimaryKeyJoinColumn();
> final String colName = superClass.getName() + "_" +
> idFeature;
> - pkjc.setName(trunc(colName.toUpperCase(), true));
> + pkjc.setName(trunc(colName, true));
> aClass.getPrimaryKeyJoinColumns().add(pkjc);
> }
> }
> @@ -308,10 +308,10 @@
> .equals(InheritanceType.JOINED_LITERAL)))) {
> final Table table = aFactory.createTable();
> table.setEModelElement(eclass);
> - table.setName(trunc(eclass.getName().toUpperCase(), false));
> + table.setName(trunc(eclass.getName(), false));
> aClass.setTable(table);
> } else if (aClass.getTable() != null &&
> aClass.getTable().getName() == null) {
> -
> aClass.getTable().setName(trunc(eclass.getName().toUpperCase (), false));
> + aClass.getTable().setName(trunc(eclass.getName(), false));
> }
>
> // if the strategy is all classes of one hierarchy in one table
> and this is not the superclass
> @@ -1067,7 +1067,7 @@
> } else {
> jcName = aClass.getAnnotatedEClass().getName() + "_" +
> name;
> }
> - jc.setName(trunc(jcName.toUpperCase(), true));
> + jc.setName(trunc(jcName, true));
> jc.setNullable(optional);
> jc.setUpdatable(isUpdateInsertable);
> jc.setInsertable(isUpdateInsertable);
>
>
> Martin Taal schrieb:
>> Hi Andre,
>> Thanks for letting me know. In which places did you remove the
>> toUpperCase()?
>>
>> Btw, related to the other exception you got (with the
>> log4j.PropertyConfigurator). I can now reproduce it.
>> There appears to be a difference between the builds distributed
>> through the update manager (which fail with this error) and the
>> directly downloadable zip files (which work).
>> I have entered a bugzilla for this exception.
>>
>> gr. Martin
>>
>> Andre R. Pareis wrote:
>>
>>> Hi,
>>>
>>> if I set the persistence option "none" to SQL_CASE_STRATEGY, then all
>>> table and column names are create in capitals. I have debugged and
>>> have seen that at the relevant code pieces a .toUppercase() always
>>> takes place.
>>>
>>> I have removed the toUppercase() calls and then the "none" option
>>> worked for me.
>>>
>>> Regards,
>>> Andre
>>
>>
>>


--

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
Previous Topic:teneo - PersistenceOptions.SQL_CASE_STRATEGY = "none" has no effect
Next Topic:teneo - persisting the ecore itself (FAQ)
Goto Forum:
  


Current Time: Fri Jul 19 07:24:48 GMT 2024

Powered by FUDForum. Page generated in 0.02847 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top