code: public int getNumberOfParents() {
          BigInteger nrOfInlinks = new BigInteger("0");
  
          long id = this.__getId();
          Session session = this.wiki.__getHibernateSession();
          session.beginTransaction();
          Object returnValue = session.createNativeQuery("select count(inLinks) from category_inlinks where id = :id")
              .setParameter("id", id, LongType.INSTANCE)
              .uniqueResult();
          session.getTransaction().commit();
  
          if (returnValue != null) {
              nrOfInlinks = (BigInteger) returnValue;
          }
          return nrOfInlinks.intValue();
      }
docs: This is a more efficient shortcut for writing "getParents().size()", as that would require to load all the parents first.
  @return The number of parents of this category.