With Hibernate, can you create a composite ID where one of the columns you are mapping to the ID can have null values?
This is to deal with a legacy table that has a
Unfortunatly, no. I either had to use a workaround:
I used composit Id for a view(! not table) where rows can be identified by 2 cols exactly (A, B). Although one of the cols (B) can have null values as well as positive integers. So my workaround is that i created a new col in the view: "BKey" and my view is written as if B is null then value of BKey is -1 else BKey = B. (Only positive integers occour in B and null). I also changed my composit id implementation to use BKey instead of B. Hope it helps for somebody..