- This topic has 5 replies, 3 voices, and was last updated 19 years, 3 months ago by
Brian Fernandes.
-
AuthorPosts
-
rzarobMemberI noticed that only the last DAO object is added as a bean in the ApplicationContext.xml after creating Hibernate Mappings (with Spring DAO classes). I believe it is a bug where only the last mapping is added as a bean in the ApplicationContext.xml configuration file. Please let me know if/when there is a fix to this. Thanks in advance.
Riyad KallaMemberIf you remove it manually from the applicationContext and then regenerate the mappings, is it re-added?
rzarobMemberI removed the one DAO generated bean from the applicationContext file then regenerated the hibernate mappings. I got the same result after doing this. All of the hibernate mappings are added to the list of mapping resources under the SessionFactory bean, but it only creates a DAO bean in the applicationContext for the last item in that list. I am assuming the code that handles this automation is writing over the previous DAO bean as opposed to adding it which would leave a DAO bean for the last item in the list. Thanks
Riyad KallaMemberCan you paste the result of MyEclipse > About > Configuration Summary for me?
rzarobMember*** Date: Fri Jan 27 12:37:38 EST 2006
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.4.2_08*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.1.0 GA
Build id: 20060122-4.1-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.1
Build id: M20050929-0840Eclipse Platform
Version: 3.1.1
Build id: M20050929-0840Eclipse Java Development Tools
Version: 3.1.1
Build id: M20050929-0840Eclipse Project SDK
Version: 3.1.1
Build id: M20050929-0840Eclipse RCP
Version: 3.1.1
Build id: M20050929-0840Eclipse Plug-in Development Environment
Version: 3.1.1
Build id: M20050929-0840Eclipse Graphical Editing Framework
Version: 3.1
Build id: 200509301327Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\data\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
d30_6c
-vm
C:\WINDOWS\system32\javaw.exe
Brian FernandesModeratorRzarob,
I investigated this an there is indeed a bug in this behaviour.
If a bean for that DAO already exists, it will not be overwritten (which is by design) – you will notice this if you modify an existing DAO bean definition and then regenerate, the bean will not be touched.Having said that, the workaround until 4.1.1 is to reverse engineer your tables one at a time so that the DAO beans definitions are created and inserted into your applicationContext.xml file correctly. Thereafter, you can reverse engineer a bunch of tables becuase we aren’t going to be updating the DAO bean definitions anyway.
Thank you for reporting this, we’re sorry you had to run into it. Please let us know if you need further assistance or have any suggestions to improve the process.
Best,
Brian.MyEclispe 4.1.1 will be out late Feb or early March.
-
AuthorPosts