Skip to content

Commit 89ce1f4

Browse files
vietnguyenclaude
andauthored
revert: backport DataElement.optionSet Hibernate mapping fix to 2.43 (#24394)
This reverts commit 8f290c3. Restores the XML-based DataElement Hibernate mapping (DataElement.hbm.xml) and reverts the annotation-based mapping migration along with the associated analytics query-planner and store changes. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4aca8e7 commit 89ce1f4

37 files changed

Lines changed: 209 additions & 616 deletions

File tree

dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseMetadataObject.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@
4141
import jakarta.persistence.Temporal;
4242
import jakarta.persistence.TemporalType;
4343
import jakarta.persistence.Transient;
44-
import java.io.Serializable;
4544
import java.util.Date;
4645
import lombok.Setter;
47-
import org.hisp.dhis.audit.AuditAttribute;
4846
import org.hisp.dhis.common.annotation.Description;
4947
import org.hisp.dhis.schema.PropertyType;
5048
import org.hisp.dhis.schema.annotation.Gist;
@@ -62,11 +60,10 @@
6260
* database columns.
6361
*/
6462
@MappedSuperclass
65-
public class BaseMetadataObject implements MetadataObject, Serializable {
63+
public class BaseMetadataObject implements MetadataObject {
6664

6765
@Column(name = "uid", unique = true, nullable = false, length = 11)
6866
@Setter
69-
@AuditAttribute
7067
protected String uid;
7168

7269
@Column(name = "created", nullable = false, updatable = false)
@@ -100,7 +97,7 @@ public class BaseMetadataObject implements MetadataObject, Serializable {
10097
@Transient @Setter protected String href;
10198

10299
/** Access information for this object. Applies to current user. */
103-
@Transient @Setter protected transient Access access;
100+
@Transient @Setter protected Access access;
104101

105102
// -------------------------------------------------------------------------------------------
106103
// Getters

dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DataDimensionItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public void setIndicator(Indicator indicator) {
337337
}
338338

339339
@JsonProperty
340-
@JsonSerialize(as = NameableObject.class)
340+
@JsonSerialize(as = BaseNameableObject.class)
341341
@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
342342
public DataElement getDataElement() {
343343
return dataElement;

dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/PrefixedDimensions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static Collection<PrefixedDimension> ofDataElements(ProgramStage programS
7171
}
7272

7373
public static Collection<PrefixedDimension> ofItemsWithProgram(
74-
Program program, Collection<? extends IdentifiableObject> objects) {
74+
Program program, Collection<? extends BaseIdentifiableObject> objects) {
7575
return objects.stream()
7676
.map(item -> PrefixedDimension.builder().item(item).program(program).build())
7777
.collect(Collectors.toList());

0 commit comments

Comments
 (0)