Lookup tables

From: Terry Jeske (terry.jesk..mail.com)
Date: Wed Dec 20 2006 - 19:34:17 EST

  • Next message: Aristedes Maniatis: "Re: Lookup tables"

    Hello,

    I have been working some with Hibernate, and while I like a lot of what it
    has to offer, but I am constantly frustrated with things that would be a no
    brainier sql query, that takes hours if not days to try in shoehorn into
    their paradigm. Here is a scenario that you cannot do in Hibernate and I am
    wonder if it is possible in Cayenne:

    Here is a table structure:

    projects_table
    --------------------------------
    id int
    projectname varchar
    status int

    status_table
    ------------------------------
    projectId int (fkey back to projects_table id)
    status_name varchar

    I have a project object as with the following variables:

    Project.java
    ---------------------------------
    int id
    String projectName
    String statusName

    Hibernate does not support this, and to get around it I have had to create a
    view that hibernate pulls from. We like having the status_table look-up
    because it makes it easy to return sorted lists of projects, while giving us
    the freedom to change status text.



    This archive was generated by hypermail 2.0.0 : Wed Dec 20 2006 - 19:34:58 EST