Ticket #849 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

createRefererCriteria - as a means for additional restriction on entity instances based on properties of a referer

Reported by: pradeep Assigned to: ronald
Priority: medium Milestone:
Component: topaz Version: 0.8.2.1
Keywords: Criteria Cc:
Blocking: Blocked By:

Description

From Ronald:

Currently createCriteria(path) creates a criteria for a child object,
i.e. you can only follow down an association from the current (parent)
object. The createParentCriteria would allow you to walk "up", e.g.

  Criteria c = s.createCriteria(Article.class);
  c.createParentCriteria(Journal.class, "hasArticle").
    add(new SubjectCriterion(jid));

would generate something like the itql above. I.e. it would be similar
to

  Criteria c = s.createCriteria(Journal.class);
  c.add(new SubjectCriterion(jid));
  c.createCriteria("hasArticle");

except that you get back Article instead of Journal.

Better name for createParentCriteria is createRefererCriteria.

Dependency Graph

Change History

03/18/08 09:52:05 changed by amit

  • milestone set to 0.8.3.

Given that the application developers are quite behind on the schedule, we can add this to 0.8.3.

03/18/08 10:15:28 changed by pradeep

  • summary changed from createRefererCriteria - as a means for additional restriction on an entity instances based on properties of a referer to createRefererCriteria - as a means for additional restriction on entity instances based on properties of a referer.

03/31/08 06:25:38 changed by ronald

  • status changed from new to closed.
  • resolution set to fixed.

(In [5192]) Added Criteria.createReferrerCriteria() to be able to walk "up" associations from other entities, not just "down" associations to other entities.

Closes #849.

07/16/08 11:00:19 changed by

  • milestone deleted.

Milestone 0.8.3 deleted