All Questions
7 questions
0
votes
1
answer
1k
views
Custom initializing of beans annotated with a custom annotation
Say for example, I have some beans annotated with @Foo, and I want to keep track of these because I want to control what happens when they are initialized, is there a way to register a custom spring ...
0
votes
2
answers
394
views
Could not initialize proxy - no Session, inside Spring interceptor
I have an interceptor in my configuration, and I want to forbid access to other users' resources. Inside the WebMvcConfig (implements WebMvcConfigurer), I have:
@Override
public void addInterceptors(...
2
votes
1
answer
303
views
JPA - If a parent entity was referenced before a JPQL query fetching child objects, the parent entity is fetched in the results ignoring lazy load
Edited
I have a simple uni directional @ManyToOne Lazy relationship:
public class UserLog {
...
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "userId", updatable=false,insertable=false)
...
3
votes
1
answer
10k
views
Using Spring @Lazy and @PostConstruct annotations
I have following classes:
@Repository
class A {
public void method1() {
...
}
}
@Component
class B implements C {
@Autowired
@Lazy
private A a;
public void method2(...
1
vote
1
answer
46
views
ssh4 LazyInitializationException
here is stack:
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:164)
org....
1
vote
1
answer
331
views
lazy fetching problem
I have a problem with lazy fetching. here's what I have. I have a entity class called channel. and another entity class called show. Each channel has many show's. I've implemented hibernate with lazy ...
0
votes
2
answers
4k
views
Proper use of getHibernateTemplate() in Spring MVC app?
I have a bunch of Hibernate mapped objects in my Spring MVC app. Default seems to be lazy loading for nested objects with relations. I realized this by getting a lot of errors in my JSP when accessing ...