[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-788) formula-based index and lazy="extra"

Simon Lebettre (JIRA) noreply at atlassian.com
Mon Oct 1 17:20:25 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28273 ] 

Simon Lebettre commented on HHH-788:
------------------------------------

Update : 

the previous workaround "some_table.lng_cd" works when you do a get but won't work when you do a put  in the extra-lazy map : 

*** But the syntax <map-key formula="(lng_cd)" type="string"/>  (use of parenthesis) will work perfectly for put and get ! 

explanation : the parenthesis gives you the ability to repeat the same column in the request, without specifying the table name (in the get the table_name is used, but in the put there is an alias based on the class name )

select descriptio0_.lng_cd as lng2_0_, (descriptio0_.lng_cd.lng_cd) as formula0_0_ from some_table descriptio0_ where descriptio0_.id=?

==> This is a crude hack, a true fix would be to let the select clause have duplicate fields when the field is "as formula" .

-------
Regards, Simon ( http://www.linkedin.com/in/simonlebettre )

> formula-based index and lazy="extra"
> ------------------------------------
>
>                 Key: HHH-788
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-788
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.1 beta 2
>            Reporter: Gavin King
>            Priority: Minor
>
> Currently, collections with formula-based indexes and lazy="extra" are broken.

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