I have 2 tables -
They both need to have a one-to-one mapping. In the
SubRequest table I need to have the Primary Key and the Foreign key on the same column (which is RequestID) .
It is easily done in DB. My application uses Hibernate. So in the hibernate mappings file I need to do the same.
Also, the requirement is that this key must be a VARCHAR and generated by the application and not auto-generated by DB. I tried doing it from the following:
But all of these have the id as Integer and auto-generated.
I could not make it work for RequestID as String. Is it possible to do this in hibernate?