Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Injecting DAO/Repository into domain entity object

HI,
I don't known what's the error, but what you are trying to do is not supported out the box by Spring (or any other depency injection framework). This is because the domain instance is managed by the JPA implementation not Spring. So If you want to inject something in the loaded domain entity you have to use an AOP and Load Time Weaving.
Look my post in the Spring forum http://forum.springframework.org/showthread.php?t=52326
Besides the keywordDao need to be @Transient

On 01-10-2008, at 6:38, Jan Vissers wrote:

Hi,

Using spring annotation configuration I've tried to inject a DAO into a
domain entity object like so

@Resource
private transient KeywordDAO keywordDao;

However when I run the JUnit test for the container DAO I immediately
run into strange errors like:

java.lang.NoSuchMethodError:
****.ImageSerie._persistence_checkFetched(Ljava/lang/String;)V

Is what I'm trying to do not support or just plain stupid?

-J.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top