[Hibernate-JIRA] Created: (HHH-2837) Collections not getting loaded when an entity has a string primary key. This is observed only for Sql Server 2005. Works fine with My-Sql.
by zoharat bhiwandiwala (JIRA)
Collections not getting loaded when an entity has a string primary key. This is observed only for Sql Server 2005. Works fine with My-Sql.
------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2837
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2837
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5 . Microsoft Sql Server 2005. Data direct database driver for Sql Server 2005
Reporter: zoharat bhiwandiwala
Attachments: MySql.txt, SqlServer2005.txt
We have an entity called Batch, which holds a collection of BatchMember entities in it.
Batch has a primary key of type string.
When we load the Batch entity from Microsoft Sql server 2005, only the batch entity data is returned. The batch members collection is always empty. Which is incorrect as there are batch members associated with it.
This test works fine when we load the batch from My Sql server.
When I changed the Batch entities primary key to a long the batch members were retrieved from both the databases.
The test's produce the same result for FetchType.EAGER or FetchType.LAZY.
Attached are the hibernate sql which get generated.
Kindly observe the one for Sql Server 2005 with primary key as string . It runs 3 queries, the third one gets rid of the batchmembers . That does not happen when the primary key is of type integer.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years
[Hibernate-JIRA] Created: (HBX-955) NPE creating HCC in Eclipse Europa
by Joseph Marques (JIRA)
NPE creating HCC in Eclipse Europa
----------------------------------
Key: HBX-955
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-955
Project: Hibernate Tools
Issue Type: Bug
Environment: eclipse 3.3.0 (europa), HibernateTools-3.2.0.200706280026-nightly
Reporter: Joseph Marques
Steps to reproduce:
1) go to Hibernate Console perspective
2) go to Hibernate Configuration view
3) right click > add configuration
4) change name
5) main tab, selected project, jndi.properties file, and hibernate.cfg.xml for the respective fields
6) classpath tab, selected postgresql-8.2.505.jdbc3 external jar and my internal domain/entity jar
7) click OK, and i get the following exception in the eclipse error log
java.lang.NullPointerException
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.isDefaultClasspath(JavaClasspathTab.java:348)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.performApply(JavaClasspathTab.java:274)
at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.performApply(AbstractLaunchConfigurationTabGroup.java:98)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.performApply(LaunchConfigurationTabGroupWrapper.java:169)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.handleApplyPressed(LaunchConfigurationTabGroupViewer.java:1356)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$3.widgetSelected(LaunchConfigurationTabGroupViewer.java:348)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1133)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog.open(LaunchConfigurationPropertiesDialog.java:230)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationPropertiesDialog(DebugUITools.java:429)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationPropertiesDialog(DebugUITools.java:408)
at org.hibernate.eclipse.console.actions.AddConfigurationAction.doAddConfiguration(AddConfigurationAction.java:71)
at org.hibernate.eclipse.console.actions.AddConfigurationAction.run(AddConfigurationAction.java:55)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Ideas as to what's going on / what I'm doing wrong?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years