Results 1 to 4 of 4

Thread: Hibernate POJO mapped to Database View doesnt have ID

  1. #1
    Join Date
    May 2006
    Posts
    142

    Default Hibernate POJO mapped to Database View doesnt have ID

    Wondering how to leverage hibernate pojo mapped to database view as satabase view doesnt have ID i.e. primary key

    That means the pojo doesnt have ID.

    I will be using the values in the pojo to generate JSF h:dataTable with ID value as the link , so that when users click on the ID link it will populate the remaining fields on the form

    Any pointers/suggestions will be highly appreciated

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I'm not sure I understand the problem. You're retrieving an item which doesn't have PK but you want to use it's PK?
    Last edited by karldmoore; Aug 27th, 2007 at 04:27 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  3. #3
    Join Date
    May 2006
    Posts
    142

    Default

    Thats right

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Err you can't . I don't understand, if it doesn't have a PK then it doesn't. What you need to do is find something you can use as the PK. Is there nothing unique at all about this data. I really don't understand what you are trying to do.
    Last edited by karldmoore; Aug 27th, 2007 at 04:27 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •