relationship to non-class object

From: Todd O'Bryan (toddobrya..ac.com)
Date: Thu Dec 01 2005 - 05:57:27 EST

  • Next message: noban: "Re: Connections & Pooling"

    In my current project, I have an enumeration of possible Day objects.
    Each Day has its own schedule. In our case, we run two schedules, Day
    One and Day Two.

    I've created a day dbEntity with id and value fields, where the value
    is just "Day One" or "Day Two" and the corresponding Day class. Now I
    need a way to find which day it is given a date. I can create a
    lookup table that has a DATE field and a Day object id, which seems
    the right thing to do, but then I don't know how to access the Day
    object given a date because the date isn't a cayenne object. Is this
    a case where it's better to just use bare SQL to grab the day ID from
    the dateToDay table or is there a more framework-friendly way of
    doing it?

    Thanks,
    Todd

    P.S. If you could cc your response to my school address (which is in
    the cc field), I'd really appreciate it. I can't get to my home email
    from school.



    This archive was generated by hypermail 2.0.0 : Thu Dec 01 2005 - 05:57:40 EST