2 Replies Latest reply: Jan 22, 2013 4:25 AM by Ben Rogers RSS

    How to Compare entity instances's attribute and find the latest one.

    Rajan.Panchal
      Hi,
      Below is my data model
      entities: the person, the job
      Relationships: the person-> the job (the person's job) 1 to M (reverse: the person's job's person)
      the person ->the job (the person's favorite job) M to M (inferred)

      Now, the job entity has below attributes: (only important ones are listed)
      1. the job's id
      2. the job's end date
      3 the job's person id

      the person entity has below attributes:(only important ones are listed)
      1. the person's id
      2. the person's most recent job id

      Using the "member of" operator I am assigning the entity instances to "the person's favourite job". Upto this things are working fine.
      Now the problem is I want to determine -"the person's most recent job id" by comparing the entity instance's attribute "the job's end date" and then getting the job Id of the same entity instance.

      Can someone help me in this..?
      thanks,