[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-5250) Allow more flexible query parameter types for binding

Steve Ebersole (JIRA) noreply at atlassian.com
Fri May 21 03:12:11 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-5250:
--------------------------------

    Description: 
SEE HHH-5238

Hi Gail,

I am not agree you, that this is not a BUG.

I am not amused that you switch the issue HHH-5238 to resolved, with out any explanation of your view.

Second: your reference, that i should use the forum for help is not on the right place.
because i know, what a question is and what a bug report is.
(I have 20 year of experiance in software development).


================================================
Explanation of my view:

In this case the string consists only numbers and representing a integer number of e.g. "10" and this can be converted to a integer 10 and i am not speaking about to convert a text string to an integer.

JDBC an do this easily.

Is hibernate so restricted ?

How you can establish a generalized query interface where only strings are transported and the provided service has no knowledge about the queried entities and the datatypes of the fields.
So i think a automatic conversion of a string representing a number to the nhumber type and so on is a esential funktionality for a
data sorage and retrieve interface.

For Hibernate the only thing to be changed for the primitive datatype handling is explaind in the following code snipplet:

IntegerType.set(PreparedStatement st, Object value, int index)
	throws SQLException {
		if (value instanceof String)
		 st.setInt( index, Integer.parseInt((String)value));
		else
		 st.setInt( index, ( (Integer) value ).intValue() );		
	}











  was:

SEE HHH-5238

Hi Gail,

I am not agree you, that this is not a BUG.

I am not amused that you switch the issue HHH-5238 to resolved, with out any explanation of your view.

Second: your reference, that i should use the forum for help is not on the right place.
because i know, what a question is and what a bug report is.
(I have 20 year of experiance in software development).


================================================
Explanation of my view:

In this case the string consists only numbers and representing a integer number of e.g. "10" and this can be converted to a integer 10 and i am not speaking about to convert a text string to an integer.

JDBC an do this easily.

Is hibernate so restricted ?

How you can establish a generalized query interface where only strings are transported and the provided service has no knowledge about the queried entities and the datatypes of the fields.
So i think a automatic conversion of a string representing a number to the nhumber type and so on is a esential funktionality for a
data sorage and retrieve interface.

For Hibernate the only thing to be changed for the primitive datatype handling is explaind in the following code snipplet:

IntegerType.set(PreparedStatement st, Object value, int index)
	throws SQLException {
		if (value instanceof String)
		 st.setInt( index, Integer.parseInt((String)value));
		else
		 st.setInt( index, ( (Integer) value ).intValue() );		
	}











     Issue Type: New Feature  (was: Bug)
        Summary: Allow more flexible query parameter types for binding  (was: On setting a String-Value for a integer entity-field in a criterion, produces a ClassCastException, see also HHH-5238)

First calm your attitude if you expect to get help.

Second I would think that your vast 20 years of experience would tell you that a request to add a new behavior is not a bug, but a feature request.  If you wish to have this treated as a feature request then categorize it as such.  Otherwise stop being a baby when someone closes a non-bug you reported as a bug.



> Allow more flexible query parameter types for binding
> -----------------------------------------------------
>
>                 Key: HHH-5250
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5250
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 3.5.1
>            Reporter: Hannes Havel
>
> SEE HHH-5238
> Hi Gail,
> I am not agree you, that this is not a BUG.
> I am not amused that you switch the issue HHH-5238 to resolved, with out any explanation of your view.
> Second: your reference, that i should use the forum for help is not on the right place.
> because i know, what a question is and what a bug report is.
> (I have 20 year of experiance in software development).
> ================================================
> Explanation of my view:
> In this case the string consists only numbers and representing a integer number of e.g. "10" and this can be converted to a integer 10 and i am not speaking about to convert a text string to an integer.
> JDBC an do this easily.
> Is hibernate so restricted ?
> How you can establish a generalized query interface where only strings are transported and the provided service has no knowledge about the queried entities and the datatypes of the fields.
> So i think a automatic conversion of a string representing a number to the nhumber type and so on is a esential funktionality for a
> data sorage and retrieve interface.
> For Hibernate the only thing to be changed for the primitive datatype handling is explaind in the following code snipplet:
> IntegerType.set(PreparedStatement st, Object value, int index)
> 	throws SQLException {
> 		if (value instanceof String)
> 		 st.setInt( index, Integer.parseInt((String)value));
> 		else
> 		 st.setInt( index, ( (Integer) value ).intValue() );		
> 	}

-- 
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list