private void addCompositeIdToColumns ( MetamodelImpl metamodel , EmbeddableType compoundKey , List < String > columns , Field field ) { if ( ! ReflectUtils . isTransientOrStatic ( field ) ) { Attribute compositeColumn = compoundKey . getAttribute ( field . getName ( ) ) ; if ( compositeColumn . getJavaType ( ) . isAnnotationPresent ( Embeddable . class ) ) { // partition key EmbeddableType partitionCol = metamodel . embeddable ( compositeColumn . getJavaType ( ) ) ; Set < Attribute > cols = partitionCol . getAttributes ( ) ; for ( Attribute col : cols ) { Field f = ( Field ) col . getJavaMember ( ) ; if ( ! ReflectUtils . isTransientOrStatic ( f ) ) { columns . add ( ( ( AbstractAttribute ) col ) . getJPAColumnName ( ) ) ; } } } else { columns . add ( ( ( AbstractAttribute ) compositeColumn ) . getJPAColumnName ( ) ) ; } } }
Adds the composite id to columns .