Featured Post

Event Sourcing Video from Michael Ploed

Event Sourcing I want to share a great video I found few days ago that describes very well what Event Sourcing is.

Wednesday, April 22, 2015

@StaticMetamodel is null

A common problem is the situation when you have a Static Metamodel attribute with NULL value. During a query that makes use of the SingularAttribute you can have a NullPointerExcepton

One of the most common problem is that the Entity class and the StaticMetamodel class must be in the same package.

In the following example User.java must be in the same package of User_.java.

User_.java

package com.simonefolinojavablog;

@StaticMetamodel(User.class)
public class User_ {
 

 public static volatile SingularAttribute id;
...
}   

]]>

No comments :

Post a Comment