Skip to content
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 3289a #254

Closed
wants to merge 8 commits into from
Closed

Trunk 3289a #254

wants to merge 8 commits into from

Conversation

andreapat
Copy link
Contributor

Clean up code.
Javadoc.

Criteria crit = sessionFactory.getCurrentSession().createCriteria(Obs.class);
crit.add(Restrictions.eq("order", order));

sessionFactory.getCurrentSession().createQuery("delete Obs where order = :orderId").setInteger("orderId",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the only line in this method, within the not-null check. I don't understand what you are doing with the orderId or the criteria - are they needed or used at all? Also, I would have thought that the query should be "delete Obs where order = :order"), and then :order is associated with the Order object, and let hibernate do it's thing.

@wluyima wluyima mentioned this pull request Jun 10, 2013
@wluyima wluyima closed this Jun 11, 2013
RandilaP pushed a commit to RandilaP/openmrs-core that referenced this pull request Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants