I am getting the stack below yet my database doesn't have any nulls..
Here's the error, my query to prove there are no nulls, and my annotations..
Code:
org.hibernate.HibernateException:null index column for collection: com.conducive.data.pojo.Contact.websiteMetrics org.hibernate.persister.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:771)
org.hibernate.collection.PersistentList.readFrom(PersistentList.java:402)
org.hibernate.loader.Loader.readCollectionElement(Loader.java:1052)
org.hibernate.loader.Loader.readCollectionElements(Loader.java:690)
org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:630)
org.hibernate.loader.Loader.doQuery(Loader.java:745)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
org.hibernate.loader.Loader.doList(Loader.java:2294)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
org.hibernate.loader.Loader.list(Loader.java:2167)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
Code:
mysql> select * from Contact_WebsiteMetrics where websiteMetrics_order is null;
Empty set (0.00 sec)
Code:
@ManyToMany(fetch = FetchType.EAGER)
@IndexColumn(name = "websiteMetrics_order")
@IndexedEmbedded
private List<WebsiteMetrics> websiteMetrics = new ArrayList<WebsiteMetrics>();