Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] EclipseLink @Lob Implementation DB Limitations

I am having an issue with EclipseLink related to LOBs (@Lob). Basically I
have a sample project which has one class (Person) which has four columns
(id, firstName, lastName, and datr). The datr column is defined as String
with the @Lob annotation.

I have a JUnit test case which loads the above structure with varying size
info in the datr column. I am using this to test writing large datasets into
the created datastructure, currently the size varies from around 250
characters up to 2mb of characters.
	
In order to make this work for derby I discovered I needed to add a column
definition (e.g. @Column(name="datr", columnDefinition="CLOB(5242880)")  
//5242880=5mb -> provides for clobs up to 5mb.) annotation to the datr
element. The next step in my testing was to switch to MySQL for the database
and test the functionality there, wherein I discovered I needed to have a
different column definition (e.g. @Column(name="datr",
columnDefinition="LONGTEXT")   //provides for clobs up to 4294967295
(4096mb).). 
	
After searching goole I also discovered the length attribute to the @Column
annotation and would expect this to solve the issue such as:
	if I specify a length of 5242880 I would expect the Persistence Provider to
create the necessary sized Lob on the target db - if this is derby it would
create a CLOB(5242880), if it is MySQL it would create a LONGTEXT.
		
Am I wrong in expecting this to be one of the key uses of EclipseLink (and
JPA)?
-- 
View this message in context: http://www.nabble.com/EclipseLink-%40Lob-Implementation-DB-Limitations-tp22230504p22230504.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top