[Hibernate-JIRA] Closed: (HHH-1052) Allow CalendarType.set to accept Date objects
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1052?page=c... ]
Steve Ebersole closed HHH-1052.
-------------------------------
Closing stale resolved issues
> Allow CalendarType.set to accept Date objects
> ---------------------------------------------
>
> Key: HHH-1052
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1052
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 rc 1
> Environment: Hibernate 3.1RC1, MySQL 4.1, Windows XP
> Reporter: Adam Greene
> Priority: Minor
> Original Estimate: 5m
> Remaining Estimate: 5m
>
> CalendarType.set expects only Calendar objects as input. But when you are building Criterias with complex requirements, you many times use a Calendar object to do the calculations, and it would be nice to be able to pass Calendar.getTime() (which returns java.util.Date) to the Restrictions methods, because otherwise you end up passing the same Calendar object two seperate calls and you change the values in between calls, resulting in possible unexpected behaviour.
> Example (though a bit contrived does show what I am talking about):
> Calendar startcal = Calendar.getInstance();
> Calendar endcal = Calendar.getInstance();
> startcal.set(Calendar.DAY_OF_MONTH, 1);
> endcal.set(Calendar.DAY_OF_MONTH, 10);
> Criterion startin = Restrictions.between("start", startcal, endcal);
> startcal.set(Calendar.DAY_OF_MONTH, 10);
> endcal.set(Calendar.DAY_OF_MONTH, 30);
> Criterion endin = Restrictions.between("end", startcal, endcal);
> This might cause unexpected behaviour, but :
> Criterion startin = Restrictions.between("start", startcal.getTime(), endcal.getTime());
> startcal.set(Calendar.DAY_OF_MONTH, 10);
> endcal.set(Calendar.DAY_OF_MONTH, 30);
> Criterion endin = Restrictions.between("end", startcal.getTime(), endcal.getTime());
> would not cause problems.
--
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
15 years, 1 month
[Hibernate-JIRA] Closed: (HBX-313) hibernate tools stuck when retrieving data from database after adding/removing mapping properties
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-313?page=co... ]
Steve Ebersole closed HBX-313.
------------------------------
Closing stale resolved issues
> hibernate tools stuck when retrieving data from database after adding/removing mapping properties
> -------------------------------------------------------------------------------------------------
>
> Key: HBX-313
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-313
> Project: Hibernate Tools
> Issue Type: Bug
> Affects Versions: 3.0alpha4
> Environment: eclipse 3.1RC3 (plain install, no other plugin than hibernate tools alpha4a), database: CA Ingres 2.6, jdk1.5update3
> Reporter: Patrik Meisinger
> Fix For: 3.1alpha5
>
>
> there's a problem when adding/removing mapping properties to the mapping file (sometable.hbm.xml).
> the hibernate tools stuck when i do the following steps:
> (i assume that a java project and a java-file representing a table in the db exists in eclipse)
> 1. create a hibernate-configuration file using the hibernate-tools-wizard (right click on the eclipse project->new->other->hibernate config file)
> 2. create a hibernate-mapping-file for out of an empty xml-file (eclipse: file->new->file somefile.hbm.xml)
> 3. add some properties and an id to the mapping file (save the file)
> 4. create a hibernate console configuratin using the hibernate-tools-wizard (right click on the eclipse project->new->other->hibernate console config) with the following data: name is the eclipse project name and classpath with jdbc-driver from ingres and the bin-folder of the project (exact in this order)
> 5. switch to hibernate console perspective
> 6. right click on console config->create session factory
> 7. expand "mapped entities"
> 8. double click on the mapped entity to retrieve data from the database
> 9. data is now shown in the "query result" view from the hibernate perspective
> 10. right click on console config->close session factory
> 11. switch back to java perspective and add or remove a property in the somefile.hbm.xml-mapping-file
> 12. switch back to hibernate console perspective
> 13. right click on console config->create session factory
> 14. expand "mapped entities"
> 15. double click on the mapped entity to retrieve data from the database. STUCK. you never get a result from the database because something causes eclipse/hibernate-plugin to stuck.
> the problem is reproduceable with the steps above: 5 tries out of 5 (even more)
> the problem occurs in eclipse 3.1RC2, too.
> possible workaround: restarting eclipse after editing the properties, but this is not satisfying.
> another problem in this relation is to add a <one-to-one>-mapping instead of adding/removing a property (i haven't tried <one-to-many> at this time). same steps as above except step 11. step 11 in this case is "switch back to java perspective and add a <one-to-one> mapping in the somefile.hbm.xml-mapping-file.
> the problem is reproduceable with the steps above: 5 tries out of 5 (even more)
> the problem occurs in eclipse 3.1RC2, too.
> possible workaround: none known.
> regards
> patrik
--
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
15 years, 1 month
[Hibernate-JIRA] Closed: (HHH-1073) InformixDialect can't populate inserted serial(4)
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1073?page=c... ]
Steve Ebersole closed HHH-1073.
-------------------------------
Closing stale resolved issues
> InformixDialect can't populate inserted serial(4)
> -------------------------------------------------
>
> Key: HHH-1073
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1073
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1 rc2
> Environment: Informix 9.4 UC 3, Hibernate 3 RC2, three seperate informix drivers
> Reporter: Dennis C. Byrne
>
> Informix has serial(4) and serial(8) instead of identity fields. The correct way to get the last assigned id is to fire "select dbinfo('serial8') from systables where tabid=1" after an insert of a serial(8) record, or "select dbinfo('sqlca.sqlerrd1') from systables where tabid=1" from a serial(4) record.
> The expression 'type==Types.BIGINT', in InformixDialect.getIdentitySelectString(), will always evaluate to true, regardless of whether the serial field is 4 or 8. Hibernate will consequently use "select dbinfo('serial8') from systables where tabid=1" for both 4 and 8.
> We have observed a similar problem w/ third party GIS software. There is another application developed by someone here who has informed me that he does not have this problem, but that application was written in H2.
> A workaround for this is to override InformixDialect.getIdentitySelectString() and force it to always return "select dbinfo('sqlca.sqlerrd1') from systables where tabid=1". This however means the app would have errors w/ serial(8).
--
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
15 years, 1 month