Project

General

Profile

Revision da556b15

IDda556b1537505b615fe45afc8ea7f0d06c5d256b
Parent a3cae466
Child 65df4525

Added by Andreas Müller over 1 year ago

fix #7859

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java
91 91
    @SuppressWarnings("unused")
92 92
    private static final Logger logger = Logger.getLogger(CdmBase.class);
93 93

  
94
    protected static final int CLOB_LENGTH = 65536;
95

  
94 96
    @Transient
95 97
    @XmlTransient
96 98
    private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/LanguageStringBase.java
54 54

  
55 55
    @XmlElement(name = "Text")
56 56
    @XmlJavaTypeAdapter(FormattedTextAdapter.class)
57
    @Column(length=65536)
57
    @Column(length=CLOB_LENGTH)
58 58
    @Field
59 59
    @FieldBridge(impl=StripHtmlBridge.class)
60 60
    @Lob
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/metadata/CdmPreference.java
18 18
import javax.persistence.Embeddable;
19 19
import javax.persistence.EmbeddedId;
20 20
import javax.persistence.Entity;
21
import javax.persistence.Lob;
21 22

  
22 23
import org.apache.commons.lang3.StringUtils;
23 24

  
......
43 44
 *  create a unique key.
44 45
 *
45 46
 *  Size of single fields may be enlarged in future versions. "Value" may
46
 *  become a CLOB.
47
 *  become a CLOB #7859.
47 48
 *
48 49
 * @author a.mueller
49 50
 * @since 03.07.2013
......
51 52
@Entity
52 53
public final class CdmPreference implements Serializable {
53 54

  
54
    private static final int VALUE_LENGTH = 1023;
55
    private static final int VALUE_LENGTH = 65536; //= CdmBase.CLOB_LENGTH;
55 56

  
56 57
    private static final long serialVersionUID = 4307599154287181582L;
57 58

  
......
116 117
	private PrefKey key;
117 118

  
118 119
	@Column(length=VALUE_LENGTH)
120
	@Lob
119 121
	private String value;
120 122

  
121 123
    //if false, the preference should not be overridden by local preferences,
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Reference.java
313 313
    private DateTime accessed;
314 314

  
315 315
    @XmlElement(name ="Abstract" )
316
	@Column(length=65536, name="referenceAbstract")
316
	@Column(length=CLOB_LENGTH, name="referenceAbstract")
317 317
	@Lob
318 318
    @Field
319 319
    //TODO Val #3379
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v50_51/SchemaUpdater_50_55.java
15 15
import org.apache.log4j.Logger;
16 16

  
17 17
import eu.etaxonomy.cdm.database.update.ColumnAdder;
18
import eu.etaxonomy.cdm.database.update.ColumnNameChanger;
18 19
import eu.etaxonomy.cdm.database.update.ColumnRemover;
19 20
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
20 21
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
......
91 92
        step = SimpleSchemaUpdaterStep.NewAuditedInstance(stepName, query, tableName, -99);
92 93
        stepList.add(step);
93 94

  
95
        //#7859 CdmPreference.value as CLOB
96
        stepName = "Make CdmPreference.value a CLOB";
97
        String columnName = "value";
98
        tableName = "CdmPreference";
99
        // TODO check non MySQL and with existing data (probably does not exist)
100
        step = ColumnNameChanger.NewClobInstance(stepName, tableName,
101
                columnName, columnName, INCLUDE_AUDIT);
102
        stepList.add(step);
103

  
94 104
        return stepList;
95 105

  
96 106
	}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)