I have the following code:
@Repository
public abstract class ConfigurationRepository extends
AbstractEntityRepository<Configuration, Long> implements
EntityRepository<Configuration, Long>, EntityManagerDelegate<
Configuration>
{
* // FIXME: why this is null?!? @Inject private
QueryInvocationContext context;*
@Inject
private EntityManager em;
/**
* Find by key.
*
* @param key
* the key
* @return the configuration
*/
public Configuration findByKey(String key)
{
QConfiguration c = QConfiguration.configuration;
return new JPAQuery<Configuration>(em).from(c).where(c.key.eq(key)).
fetchFirst();
}
}
The *QueryInvocationContext*is null so I had to inject the EM directly. Any
idea why it's null or how to figure out why it's null?
Regards,
LA