-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TRUNK-6276: Fix ValidateHibernateMappingsDatabaseIT test errors when running with MySQL #4806
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,14 @@ | |
import org.openmrs.BaseChangeableOpenmrsMetadata; | ||
import org.openmrs.serialization.OpenmrsSerializer; | ||
|
||
import javax.persistence.AttributeOverride; | ||
import javax.persistence.AttributeOverrides; | ||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
import javax.persistence.Lob; | ||
import javax.persistence.Table; | ||
|
||
/** | ||
|
@@ -28,6 +31,9 @@ | |
@Entity | ||
@Table(name = "serialized_object") | ||
@Audited | ||
@AttributeOverrides(value = { | ||
@AttributeOverride(name = "description", column = @Column(name = "description", length = 5000)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this also be text? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh wait, why should a description be that large? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
DDL for this table looks like this. What do you suggest? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like that was a typo 😊 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should it be |
||
}) | ||
public class SerializedObject extends BaseChangeableOpenmrsMetadata { | ||
|
||
@Id | ||
|
@@ -49,7 +55,8 @@ public class SerializedObject extends BaseChangeableOpenmrsMetadata { | |
@Column(name = "serialization_class", nullable = false, length = 255) | ||
private Class<? extends OpenmrsSerializer> serializationClass; | ||
|
||
@Column(name = "serialized_data", length = 16777215) | ||
@Column(name = "serialized_data", columnDefinition = "mediumtext") | ||
@Lob | ||
private String serializedData; | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the default length be 255?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default length of varchar is set to 255 by JPA, so there's no need to explicitly define it