My DAO gets information from the database using this line of code.
public Object[] getTagData() {
List TagData = entityManager.createNativeQuery("SELECT sub.name, count(st.tags_tagId) as tagCount FROM subject as sub LEFT JOIN subject_tag st on st.subject_subjectId = sub.subjectId GROUP BY sub.name;")
.getResultList();
return TagData.toArray();
}
It returns
[Ljava.lang.Object;@27d027d
I need to convert this into a String so that I know in what form it will return.