Class: JavaMappingBLOB

Inherits:
JavaMapping show all
Defined in:
lib/ontomde-uml2-jpa/mapping.rb

Instance Method Summary collapse

Instance Method Details

#jpa_addTypeModificator(ah) ⇒ Object



273
274
275
276
277
278
279
# File 'lib/ontomde-uml2-jpa/mapping.rb', line 273

def jpa_addTypeModificator(ah)
  ah.java_annotation_add("@Lob")
  #mysql: MEDIUMBLOB LONGBLOB TINYBLOB BLOB
  ah.java_annotation_add(%{@Column(columnDefinition="LONGBLOB")}) if ah.context[:mysql]
  #cf: http://db.apache.org/derby/docs/10.1/ref/rrefblob.html
  ah.java_annotation_add(%{@Column(columnDefinition="BLOB(4M)")}) if ah.context[:derby]
end