if (pkExtends != null) {
// We need to test if so far we haven't collected any properties to allow to set top class
// If we don't check this, we could be loosing primary key's properties
// NOTE: xdoclet1 allowed this, although it generates non compiling class
if (current.isEmpty() && current.getParent() == null) {
current.setType(new EjbJavaType(pkExtends));
current = new PkClass(current);
} else {
throw ejbUtils.getErrorWithTagLocation(pkTag,
"Can't set \"extends\" property without loosing current primary key properties: " +
current);