Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Problem with table generation using a converter and column length(Using a converter causes the length to be ignored and default varchar(255) column created.)
Problem with table generation using a converter and column length [message #1077630] Fri, 02 August 2013 00:34 Go to next message
Steve Wilkes is currently offline Steve Wilkes
Messages: 1
Registered: August 2013
Junior Member
I have an xx-orm.xml file being used for a persistence unit with many entity definitions.

In these definitions I often have attributes that relate to columns that need a length and/or datatype specified as well as a converter, for example:

<id name="uuid">
<column name="objectid" length="100"/>
<convert>UUIDConverter</convert>
</id>

or
<basic name="permissions" >
<column name="PERMISSIONS" columnDefinition="CLOB"/>
<lob/>
<convert>PermissionsListConverter</convert>
</basic>

This works fine if the database is pre-created, but if EclipseLink is used to create the database I get the following exceptions:

[EL Warning]: metadata: 2013-08-01 16:52:51.017--ServerSession(917261895)--Ignoring JPA convert specification on element [field uuid] within entity class [class com.webaction.runtime.MetaInfo$MetaObject] since EclipseLink convert metadata is specified.

[EL Warning]: metadata: 2013-08-01 16:52:51.03--ServerSession(917261895)--Ignoring JPA convert specification on element [field permissions] within entity class [class com.webaction.runtime.MetaInfo$User] since EclipseLink convert metadata is specified.

The resulting columns in the database have the default VARCHAR(255) definitions, not VARCHAR(100) and CLOB respectively.

Is there any way I can both specify a converter and a length or datatype for a column during table creation?

Thanks
Re: Problem with table generation using a converter and column length [message #1082408 is a reply to message #1077630] Thu, 08 August 2013 14:28 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The warning are not related and can be ignored.

It is a bug if the @Column properties are not being used with a converter. Please try the latest release, and if it still occurs, please log a bug and vote for it.


James : Wiki : Book : Blog : Twitter
Re: Problem with table generation using a converter and column length [message #1082409 is a reply to message #1082408] Thu, 08 August 2013 14:29 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

As a workaround you could set the properties on the mapping's DatabaseField using a DescriptorCustomizer.


James : Wiki : Book : Blog : Twitter
Previous Topic:Behaviour merge() of detached objects
Next Topic:JPA 2.1 @Converter bug?
Goto Forum:
  


Current Time: Sat Nov 01 04:37:35 GMT 2014

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

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