private Field getPartitionKeyField ( ) { Field [ ] embeddedFields = entityMetadata . getIdAttribute ( ) . getBindableJavaType ( ) . getDeclaredFields ( ) ; Field field = null ; for ( Field embeddedField : embeddedFields ) { if ( ! ReflectUtils . isTransientOrStatic ( embeddedField ) ) { field = embeddedField ; break ; } } return field ; }
Will return partition key part of composite id .