Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo] too long comment
| | | | |
Re: [Teneo] too long comment [message #91110 is a reply to message #91095] |
Fri, 20 July 2007 06:01   |
Eclipse User |
|
|
|
If the comment is on a many-to-one you also have to override the ManyToOneMapper, the same for
ManyToMany.
In the future I will move these utility methods to a separate utility class which can be replaced by
itself. That's easier than overriding all these subclasses.
gr. Martin
wolf_roma wrote:
> I did all what you say, where mistakes?:
> ......
> final ExtensionManager extensionManager = hds.getExtensionManager();
> extensionManager.registerExtension(BasicMapper.class.getName (),
> BasicMapperEx.class.getName());
> extensionManager.registerExtension(OneToManyMapper.class.get Name(),
> OneToManyMapperEx.class.getName());
> hds.initialize();
> ......
> public class BasicMapperEx extends BasicMapper{
>
> /* (non-Javadoc)
> * @see
> org.eclipse.emf.teneo.hibernate.mapper.AbstractMapper#addCom mentElement(org.eclipse.emf.ecore.EModelElement,
> org.eclipse.emf.teneo.simpledom.Element)
> */
> @Override
> protected Element addCommentElement(EModelElement modelElement,
> Element hbmElement)
> {
> return null;
> }
> }
> .....
> public class OneToManyMapperEx extends OneToManyMapper{
> /* (non-Javadoc)
> * @see
> org.eclipse.emf.teneo.hibernate.mapper.AbstractMapper#addCom mentElement(org.eclipse.emf.ecore.EModelElement,
> org.eclipse.emf.teneo.simpledom.Element)
> */
> @Override
> protected Element addCommentElement(EModelElement modelElement,
> Element hbmElement)
> {
> return null;
> }
> }
>
> I have comment and haven't table )))
>
>
--
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] too long comment [message #91125 is a reply to message #91110] |
Fri, 20 July 2007 06:17  |
Eclipse User |
|
|
|
:) I did what you say:
extensionManager.registerExtension(BasicMapper.class.getName (),
BasicMapperEx.class.getName());
extensionManager.registerExtension(OneToManyMapper.class.get Name(),
OneToManyMapperEx.class.getName());
extensionManager.registerExtension(ManyToOneMapper.class.get Name(),
ManyToOneMapperEx.class.getName());
extensionManager.registerExtension(ManyToManyMapper.class.ge tName(),
ManyToManyMapperEx.class.getName());
I check, extension work (return null from function)..
....
27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful:
create table `cstmconditiondocmentstype` (`documentbasetype_e_id` bigint not
null, `linenumber` numeric(2,2), `sublinenumber` varchar(2),
`documentmodecode` varchar(4), `informationcode` varchar(2), `perioddate`
date not null, `conditiondate` date, `saledate` date, `presentingdate` date,
`goodsstatus` varchar(1), `repairstatus` bit, primary key
(`documentbasetype_e_id`)) comment='???????? ? ??????????, ??????????? ? ?.
9.1 -9.6 ?? ??????????? ???????, ????? ??? ???????????? ? ???????? ?????????
?? ??????????? ???????.'
27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Too long
comment for table 'cstmconditiondocmentstype'
....
|
|
|
Re: [Teneo] too long comment [message #91140 is a reply to message #91125] |
Fri, 20 July 2007 06:17  |
Eclipse User |
|
|
|
And there is EntityMapper, IdMapper and ManyAttributeMapper. I think it is the EntityMapper as the
error seems to be on the table name.
Hmmm, I see now that your first post already mentioned this, I should have looked better...
gr. Martin
wolf_roma wrote:
> :) I did what you say:
>
> extensionManager.registerExtension(BasicMapper.class.getName (),
> BasicMapperEx.class.getName());
> extensionManager.registerExtension(OneToManyMapper.class.get Name(),
> OneToManyMapperEx.class.getName());
> extensionManager.registerExtension(ManyToOneMapper.class.get Name(),
> ManyToOneMapperEx.class.getName());
> extensionManager.registerExtension(ManyToManyMapper.class.ge tName(),
> ManyToManyMapperEx.class.getName());
>
> I check, extension work (return null from function)..
>
> ....
>
> 27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful:
> create table `cstmconditiondocmentstype` (`documentbasetype_e_id` bigint not
> null, `linenumber` numeric(2,2), `sublinenumber` varchar(2),
> `documentmodecode` varchar(4), `informationcode` varchar(2), `perioddate`
> date not null, `conditiondate` date, `saledate` date, `presentingdate` date,
> `goodsstatus` varchar(1), `repairstatus` bit, primary key
> (`documentbasetype_e_id`)) comment='???????? ? ??????????, ??????????? ? ?.
> 9.1 -9.6 ?? ??????????? ???????, ????? ??? ???????????? ? ???????? ?????????
> ?? ??????????? ???????.'
>
> 27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Too long
> comment for table 'cstmconditiondocmentstype'
>
> ....
>
>
>
>
>
--
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] too long comment [message #608829 is a reply to message #91025] |
Fri, 20 July 2007 04:25  |
Eclipse User |
|
|
|
Comments are new so therefor it now appears. There is no option for that (yet). Can you enter a
bugzilla for this?
For now if the comment is a primitive field then you have to subclass
BasicMapper and override this method:
protected Element addCommentElement(EModelElement eModelElement, Element hbmElement) {
and just return null.
You can set your BasicMapper as an Extension.
If the long comment is in a onetomany then the OneToManyMapper has to be extended etc.
Btw, I tested your case before this last release and it worked on mysql.
For my interest how large is the length constraint for the comment?
gr. Martin
wolf_roma wrote:
> Unsuccessful: create table Too long comment for table
>
> How I can disable comment?
>
>
--
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] too long comment [message #608833 is a reply to message #91054] |
Fri, 20 July 2007 05:54  |
Eclipse User |
|
|
|
I did all what you say, where mistakes?:
......
final ExtensionManager extensionManager = hds.getExtensionManager();
extensionManager.registerExtension(BasicMapper.class.getName (),
BasicMapperEx.class.getName());
extensionManager.registerExtension(OneToManyMapper.class.get Name(),
OneToManyMapperEx.class.getName());
hds.initialize();
......
public class BasicMapperEx extends BasicMapper{
/* (non-Javadoc)
* @see
org.eclipse.emf.teneo.hibernate.mapper.AbstractMapper#addCom mentElement(org.eclipse.emf.ecore.EModelElement,
org.eclipse.emf.teneo.simpledom.Element)
*/
@Override
protected Element addCommentElement(EModelElement modelElement,
Element hbmElement)
{
return null;
}
}
.....
public class OneToManyMapperEx extends OneToManyMapper{
/* (non-Javadoc)
* @see
org.eclipse.emf.teneo.hibernate.mapper.AbstractMapper#addCom mentElement(org.eclipse.emf.ecore.EModelElement,
org.eclipse.emf.teneo.simpledom.Element)
*/
@Override
protected Element addCommentElement(EModelElement modelElement,
Element hbmElement)
{
return null;
}
}
I have comment and haven't table )))
|
|
|
Re: [Teneo] too long comment [message #608834 is a reply to message #91095] |
Fri, 20 July 2007 06:01  |
Eclipse User |
|
|
|
If the comment is on a many-to-one you also have to override the ManyToOneMapper, the same for
ManyToMany.
In the future I will move these utility methods to a separate utility class which can be replaced by
itself. That's easier than overriding all these subclasses.
gr. Martin
wolf_roma wrote:
> I did all what you say, where mistakes?:
> ......
> final ExtensionManager extensionManager = hds.getExtensionManager();
> extensionManager.registerExtension(BasicMapper.class.getName (),
> BasicMapperEx.class.getName());
> extensionManager.registerExtension(OneToManyMapper.class.get Name(),
> OneToManyMapperEx.class.getName());
> hds.initialize();
> ......
> public class BasicMapperEx extends BasicMapper{
>
> /* (non-Javadoc)
> * @see
> org.eclipse.emf.teneo.hibernate.mapper.AbstractMapper#addCom mentElement(org.eclipse.emf.ecore.EModelElement,
> org.eclipse.emf.teneo.simpledom.Element)
> */
> @Override
> protected Element addCommentElement(EModelElement modelElement,
> Element hbmElement)
> {
> return null;
> }
> }
> .....
> public class OneToManyMapperEx extends OneToManyMapper{
> /* (non-Javadoc)
> * @see
> org.eclipse.emf.teneo.hibernate.mapper.AbstractMapper#addCom mentElement(org.eclipse.emf.ecore.EModelElement,
> org.eclipse.emf.teneo.simpledom.Element)
> */
> @Override
> protected Element addCommentElement(EModelElement modelElement,
> Element hbmElement)
> {
> return null;
> }
> }
>
> I have comment and haven't table )))
>
>
--
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] too long comment [message #608835 is a reply to message #91110] |
Fri, 20 July 2007 06:17  |
Eclipse User |
|
|
|
:) I did what you say:
extensionManager.registerExtension(BasicMapper.class.getName (),
BasicMapperEx.class.getName());
extensionManager.registerExtension(OneToManyMapper.class.get Name(),
OneToManyMapperEx.class.getName());
extensionManager.registerExtension(ManyToOneMapper.class.get Name(),
ManyToOneMapperEx.class.getName());
extensionManager.registerExtension(ManyToManyMapper.class.ge tName(),
ManyToManyMapperEx.class.getName());
I check, extension work (return null from function)..
....
27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful:
create table `cstmconditiondocmentstype` (`documentbasetype_e_id` bigint not
null, `linenumber` numeric(2,2), `sublinenumber` varchar(2),
`documentmodecode` varchar(4), `informationcode` varchar(2), `perioddate`
date not null, `conditiondate` date, `saledate` date, `presentingdate` date,
`goodsstatus` varchar(1), `repairstatus` bit, primary key
(`documentbasetype_e_id`)) comment='???????? ? ??????????, ??????????? ? ?.
9.1 -9.6 ?? ??????????? ???????, ????? ??? ???????????? ? ???????? ?????????
?? ??????????? ???????.'
27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Too long
comment for table 'cstmconditiondocmentstype'
....
|
|
|
Re: [Teneo] too long comment [message #608836 is a reply to message #91125] |
Fri, 20 July 2007 06:17  |
Eclipse User |
|
|
|
And there is EntityMapper, IdMapper and ManyAttributeMapper. I think it is the EntityMapper as the
error seems to be on the table name.
Hmmm, I see now that your first post already mentioned this, I should have looked better...
gr. Martin
wolf_roma wrote:
> :) I did what you say:
>
> extensionManager.registerExtension(BasicMapper.class.getName (),
> BasicMapperEx.class.getName());
> extensionManager.registerExtension(OneToManyMapper.class.get Name(),
> OneToManyMapperEx.class.getName());
> extensionManager.registerExtension(ManyToOneMapper.class.get Name(),
> ManyToOneMapperEx.class.getName());
> extensionManager.registerExtension(ManyToManyMapper.class.ge tName(),
> ManyToManyMapperEx.class.getName());
>
> I check, extension work (return null from function)..
>
> ....
>
> 27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful:
> create table `cstmconditiondocmentstype` (`documentbasetype_e_id` bigint not
> null, `linenumber` numeric(2,2), `sublinenumber` varchar(2),
> `documentmodecode` varchar(4), `informationcode` varchar(2), `perioddate`
> date not null, `conditiondate` date, `saledate` date, `presentingdate` date,
> `goodsstatus` varchar(1), `repairstatus` bit, primary key
> (`documentbasetype_e_id`)) comment='???????? ? ??????????, ??????????? ? ?.
> 9.1 -9.6 ?? ??????????? ???????, ????? ??? ???????????? ? ???????? ?????????
> ?? ??????????? ???????.'
>
> 27563 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Too long
> comment for table 'cstmconditiondocmentstype'
>
> ....
>
>
>
>
>
--
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
|
|
|
Goto Forum:
Current Time: Fri Jul 04 11:06:31 EDT 2025
Powered by FUDForum. Page generated in 0.60227 seconds
|