I like to point out that if one of the sources is @JoinColumn that should win or at least have priority, because you can find the correct length/size in the referenced column (I have never seen a NUMERIC(PRECISION,SCALE) as primary key)