Results 1 to 2 of 2

Thread: database reverse engineering with string fixed length primary key hibernate and mysql

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    25

    Default database reverse engineering with string fixed length primary key hibernate and mysql

    I am using roo's database reverse engineering with a class that has a string of fixed length as the primary key

    I am also using hibernate and mysql

    I'm an getting an error that that field can not be null, it seems that a key is not being generated automatically, where should I look for my problem?

  2. #2
    Join Date
    Nov 2008
    Posts
    25

    Default

    Quote Originally Posted by melutovich View Post
    I am using roo's database reverse engineering with a class that has a string of fixed length as the primary key

    I am also using hibernate and mysql

    I'm an getting an error that that field can not be null, it seems that a key is not being generated automatically, where should I look for my problem?
    Ok I found my problem in that mysql does not generate automatically string primary keys. That AUTO-INCREMENT does not apply on strings.

    NEW question, is there a way to tell roo that these primary keys should be exposed on the user interface so that I can manually specify a PK at time of creation?

Posting Permissions

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