code: public Collection<CascadeType> getCascades(SingularAttribute<?, ?> attribute) {
          if (attribute.getJavaMember() instanceof AccessibleObject) {
              AccessibleObject accessibleObject = (AccessibleObject) attribute.getJavaMember();
              OneToOne oneToOne = accessibleObject.getAnnotation(OneToOne.class);
              if (oneToOne != null) {
                  return newArrayList(oneToOne.cascade());
              }
              ManyToOne manyToOne = accessibleObject.getAnnotation(ManyToOne.class);
              if (manyToOne != null) {
                  return newArrayList(manyToOne.cascade());
              }
          }
          return newArrayList();
      }
docs: Retrieves cascade from metamodel attribute on a xToMany relation.
  
  @param attribute given singular attribute
  @return an empty collection if no jpa relation annotation can be found.