Skip to content

Conversation

@shivvani-r
Copy link

Description of what I changed

I have migrated the CohortMembership domain object from legacy Hibernate XML mappings to standard JPA annotations.

Specific changes include:

  • Added JPA annotations (@Entity, @Table, @Column, etc.) to CohortMembership.java.
  • Implemented the ID mapping using @GenericGenerator with the native strategy. This preserves the legacy sequence name (cohort_member_cohort_member_id_seq) for PostgreSQL compatibility, while defaulting to auto-increment for MySQL.
  • Deleted the obsolete CohortMembership.hbm.xml file.
  • Updated hibernate.cfg.xml to reference the annotated class instead of the XML resource.

Issue I worked on

see https://issues.openmrs.org/browse/TRUNK-5902

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.

  • I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)

  • I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.

  • All new and existing tests passed.

  • My pull request is based on the latest changes of the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant