[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5758) A code bug in AbstractPersistor class ...

Vince (JIRA) noreply at atlassian.com
Fri Nov 26 14:59:13 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39219#action_39219 ] 

Vince  commented on HHH-5758:
-----------------------------

My bad ... class name is AbstractEntityPersister. 
package org.hibernate.persister.entity;

Line no 2143 in 3.6 Final release.

> A code bug in AbstractPersistor class ... 
> ------------------------------------------
>
>                 Key: HHH-5758
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5758
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.0
>         Environment: All
>            Reporter: Vince 
>
> Here is code snippet:
> 	protected int dehydrate(
> 			Serializable id,
> 			Object[] fields,
> 			boolean[] includeProperty,
> 			boolean[][] includeColumns,
> 			int j,
> 			PreparedStatement st,
> 			SessionImplementor session) throws HibernateException, SQLException {
> 		return dehydrate( id, fields, null, includeProperty, includeColumns, j, st, session, 1 );
> 	}
> The thing is .. it passes hardcoded '1' as the last argument .. which makes it impossible to write a custom generator for composite keys.
> It assumes that "public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()" function would never add any column of of composite key on its own.  I think it is buggy and right now the only alternative i have is to parse the SQL string.

-- 
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