private String getActualColumnName(Attribute attribute) { if (attribute instanceof DefaultSingularAttribute) { DefaultSingularAttribute dsAttribute = (DefaultSingularAttribute) attribute; if (dsAttribute.isId()) { return "_id"; } else { return dsAttribute.getJPAColumnName(); } } else if (attribute instanceof AbstractAttribute) { return ((AbstractAttribute) attribute).getJPAColumnName(); } else { return attribute.getName(); } }
.getIdAttribute()).getJPAColumnName())))
@Override public boolean isOptional() { boolean isNullable = true; if (!isId()) { Column anno = member.getAnnotation(Column.class); if (anno != null) { isNullable = anno.nullable(); } } else { isNullable = false; } return isNullable; }
@Override public <Y> Path<Y> get(String paramString) { Attribute attribute = null; if (this.attribute != null && this.attribute.getPersistentAttributeType().equals(PersistentAttributeType.EMBEDDED)) { try { DefaultEmbeddableType embeddableType = (DefaultEmbeddableType) ((DefaultSingularAttribute) this.attribute) .getType(); attribute = embeddableType.getAttribute(paramString); } catch (IllegalArgumentException iaex) { // do nothing. ignore } } attribute = attribute == null ? this.managedType.getAttribute(paramString) : attribute; // TODO:: need to check for illegalStateException. return cache.get(attribute, this.entityType, this.attribute); }
.getIdAttribute()).getJPAColumnName())))
&& ((DefaultSingularAttribute) targetAttribute).isId())
private String getActualColumnName(Attribute attribute) { if (attribute instanceof DefaultSingularAttribute) { DefaultSingularAttribute dsAttribute = (DefaultSingularAttribute) attribute; if (dsAttribute.isId()) { return "_id"; } else { return dsAttribute.getJPAColumnName(); } } else if (attribute instanceof AbstractAttribute) { return ((AbstractAttribute) attribute).getJPAColumnName(); } else { return attribute.getName(); } }
&& ((DefaultSingularAttribute) targetAttribute).isId())