[Hibernate-JIRA] Updated: (HHH-1829) Allow join on any property using property-ref
by Christian Bauer (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829?page=c... ]
Christian Bauer updated HHH-1829:
---------------------------------
Comment: was deleted
> Allow join on any property using property-ref
> ---------------------------------------------
>
> Key: HHH-1829
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829
> Project: Hibernate3
> Issue Type: New Feature
> Components: metamodel
> Affects Versions: 3.2.0 cr1, 3.2.0.cr2
> Reporter: Maarten Winkels
> Assignee: Steve Ebersole
> Attachments: AbstractJoinTest.java, HHH-1829-mwinkels.patch, hhh-1829.patch, JoinNoPropertyRefTest.java, JoinPropertyRefTest.java, Person.hbm.xml, Person.java, PersonNoPropertyRef.hbm.xml
>
>
> Currently joining tables for one class (uing the <join...> tag) is only supported for the id property. The property-ref is allowed on the <key..> tag inside the <join..> tag, but this is ignored.
--
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, 4 months
[Hibernate-JIRA] Commented: (HHH-1479) Incompatibility of Hibernate 3.1 and JTOpen JDBC drivers for IBM AS/400
by Michael Schmuck (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1479?page=c... ]
Michael Schmuck commented on HHH-1479:
--------------------------------------
I', sorry but I've tryed version 3.0 final up to 3.2 ga and I got allways the same error.
Did I understand you correctly that 3.2 has been "repaired" to work with the jt400 driver? (sorry for bad english)
> Incompatibility of Hibernate 3.1 and JTOpen JDBC drivers for IBM AS/400
> -----------------------------------------------------------------------
>
> Key: HHH-1479
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1479
> Project: Hibernate3
> Issue Type: Patch
> Affects Versions: 3.1
> Environment: Hibernate 3.1
> JDBC driver: JTOpen (for IBM AS/400) http://jt400.sourceforge.net
> Reporter: Davide Rogora
> Assignee: Steve Ebersole
>
> Hello,
> I've noticed that from version 3.1 Hibernate, when calling JDBC driver for INSERT statement, uses the following prepareStatement method:
> prepareStatement(String sql, String[] columnNames)
> instead of the following
> prepareStatement(String sql, int autoGeneratedKeys)
> used since versione 3.0.x
> the problem is that JDBC driver for AS/400 (project JTOpen on sourceforge: http://jt400.sourceforge.net) doesn't support the method prepareStatement(String sql, String[] columnNames) so it's not possible to use Hibernate 3.1 with AS/400
> I've also noticed that other open source drivers that support this method (for example MySQL Jdbcconnector or JTDS for Ms-SQLServer) have implemented it using a workaround; infact they call the "old" prepareStatement(String sql, int autoGeneratedKeys) method ignoring the content of the columnNames array.
> Here is the source of the jtds implementation:
> -------------------------------------------------------------------------------
> public PreparedStatement prepareStatement(String sql, String[] columnNames)
> throws SQLException {
> if (columnNames == null) {
> throw new SQLException(
> Messages.get("error.generic.nullparam", "prepareStatement"),"HY092");
> } else if (columnNames.length != 1) {
> throw new SQLException(
> Messages.get("error.generic.needcolname", "prepareStatement"),"HY092");
> }
> return prepareStatement(sql, JtdsStatement.RETURN_GENERATED_KEYS);
> }
> -------------------------------------------------------------------------------
> So I'm asking to the Hibernate team if it's possible to use the old method prepareStatement(String sql, int autoGeneratedKeys) in the future releases of Hibernate.
> Thanks,
> Davide Rogora.
--
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, 4 months
[Hibernate-JIRA] Commented: (HHH-1829) Allow join on any property using property-ref
by Vadim Lotarev (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829?page=c... ]
Vadim Lotarev commented on HHH-1829:
------------------------------------
Steve,
When this issue is going to be resolved? As for me this is very importan feature ...
Thanks,
Vadim
> Allow join on any property using property-ref
> ---------------------------------------------
>
> Key: HHH-1829
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829
> Project: Hibernate3
> Issue Type: New Feature
> Components: metamodel
> Affects Versions: 3.2.0 cr1, 3.2.0.cr2
> Reporter: Maarten Winkels
> Assignee: Steve Ebersole
> Attachments: AbstractJoinTest.java, HHH-1829-mwinkels.patch, hhh-1829.patch, JoinNoPropertyRefTest.java, JoinPropertyRefTest.java, Person.hbm.xml, Person.java, PersonNoPropertyRef.hbm.xml
>
>
> Currently joining tables for one class (uing the <join...> tag) is only supported for the id property. The property-ref is allowed on the <key..> tag inside the <join..> tag, but this is ignored.
--
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, 4 months
[Hibernate-JIRA] Closed: (HHH-1479) Incompatibility of Hibernate 3.1 and JTOpen JDBC drivers for IBM AS/400
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1479?page=c... ]
Steve Ebersole closed HHH-1479.
-------------------------------
Resolution: Cannot Reproduce
guys, as mentioned quite a while ago, 3.2 reverted back to using that version of prepareStatement for generated keys.
> Incompatibility of Hibernate 3.1 and JTOpen JDBC drivers for IBM AS/400
> -----------------------------------------------------------------------
>
> Key: HHH-1479
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1479
> Project: Hibernate3
> Issue Type: Patch
> Affects Versions: 3.1
> Environment: Hibernate 3.1
> JDBC driver: JTOpen (for IBM AS/400) http://jt400.sourceforge.net
> Reporter: Davide Rogora
> Assignee: Steve Ebersole
>
> Hello,
> I've noticed that from version 3.1 Hibernate, when calling JDBC driver for INSERT statement, uses the following prepareStatement method:
> prepareStatement(String sql, String[] columnNames)
> instead of the following
> prepareStatement(String sql, int autoGeneratedKeys)
> used since versione 3.0.x
> the problem is that JDBC driver for AS/400 (project JTOpen on sourceforge: http://jt400.sourceforge.net) doesn't support the method prepareStatement(String sql, String[] columnNames) so it's not possible to use Hibernate 3.1 with AS/400
> I've also noticed that other open source drivers that support this method (for example MySQL Jdbcconnector or JTDS for Ms-SQLServer) have implemented it using a workaround; infact they call the "old" prepareStatement(String sql, int autoGeneratedKeys) method ignoring the content of the columnNames array.
> Here is the source of the jtds implementation:
> -------------------------------------------------------------------------------
> public PreparedStatement prepareStatement(String sql, String[] columnNames)
> throws SQLException {
> if (columnNames == null) {
> throw new SQLException(
> Messages.get("error.generic.nullparam", "prepareStatement"),"HY092");
> } else if (columnNames.length != 1) {
> throw new SQLException(
> Messages.get("error.generic.needcolname", "prepareStatement"),"HY092");
> }
> return prepareStatement(sql, JtdsStatement.RETURN_GENERATED_KEYS);
> }
> -------------------------------------------------------------------------------
> So I'm asking to the Hibernate team if it's possible to use the old method prepareStatement(String sql, int autoGeneratedKeys) in the future releases of Hibernate.
> Thanks,
> Davide Rogora.
--
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, 5 months
[Hibernate-JIRA] Commented: (HHH-1479) Incompatibility of Hibernate 3.1 and JTOpen JDBC drivers for IBM AS/400
by Michael Schmuck (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1479?page=c... ]
Michael Schmuck commented on HHH-1479:
--------------------------------------
Hello,
I have the same problem. Is there any solution in progress?
Michael
> Incompatibility of Hibernate 3.1 and JTOpen JDBC drivers for IBM AS/400
> -----------------------------------------------------------------------
>
> Key: HHH-1479
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1479
> Project: Hibernate3
> Issue Type: Patch
> Affects Versions: 3.1
> Environment: Hibernate 3.1
> JDBC driver: JTOpen (for IBM AS/400) http://jt400.sourceforge.net
> Reporter: Davide Rogora
> Assignee: Steve Ebersole
>
> Hello,
> I've noticed that from version 3.1 Hibernate, when calling JDBC driver for INSERT statement, uses the following prepareStatement method:
> prepareStatement(String sql, String[] columnNames)
> instead of the following
> prepareStatement(String sql, int autoGeneratedKeys)
> used since versione 3.0.x
> the problem is that JDBC driver for AS/400 (project JTOpen on sourceforge: http://jt400.sourceforge.net) doesn't support the method prepareStatement(String sql, String[] columnNames) so it's not possible to use Hibernate 3.1 with AS/400
> I've also noticed that other open source drivers that support this method (for example MySQL Jdbcconnector or JTDS for Ms-SQLServer) have implemented it using a workaround; infact they call the "old" prepareStatement(String sql, int autoGeneratedKeys) method ignoring the content of the columnNames array.
> Here is the source of the jtds implementation:
> -------------------------------------------------------------------------------
> public PreparedStatement prepareStatement(String sql, String[] columnNames)
> throws SQLException {
> if (columnNames == null) {
> throw new SQLException(
> Messages.get("error.generic.nullparam", "prepareStatement"),"HY092");
> } else if (columnNames.length != 1) {
> throw new SQLException(
> Messages.get("error.generic.needcolname", "prepareStatement"),"HY092");
> }
> return prepareStatement(sql, JtdsStatement.RETURN_GENERATED_KEYS);
> }
> -------------------------------------------------------------------------------
> So I'm asking to the Hibernate team if it's possible to use the old method prepareStatement(String sql, int autoGeneratedKeys) in the future releases of Hibernate.
> Thanks,
> Davide Rogora.
--
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, 5 months
[Hibernate-JIRA] Created: (HHH-2488) Resolution of filters' conditions should be postponed till all mappings are loaded.
by Dmitry Katsubo (JIRA)
Resolution of filters' conditions should be postponed till all mappings are loaded.
-----------------------------------------------------------------------------------
Key: HHH-2488
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2488
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.2
Environment: Hibernate-Version: 3.2.2.ga
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Reporter: Dmitry Katsubo
When trying to use the possibility to define the conditions for the same filters in {{<filter-def>}}, the following exception occurs, as the resolution of conditions should be done at a later stage, after all mappings are loaded:
{noformat}
Exception in thread "main" java.lang.NullPointerException
at org.hibernate.cfg.HbmBinder.parseFilter(HbmBinder.java:2931)
at org.hibernate.cfg.HbmBinder.bindCollection(HbmBinder.java:1462)
at org.hibernate.cfg.HbmBinder$2.create(HbmBinder.java:2757)
{noformat}
The example of definition, that uses filters:
{code:xml|title=clauses.hbm.xml|borderStyle=solid}
<class name="ClauseFolderImpl" table="stc_folders">
<id name="id">
<generator class="native" />
</id>
<property name="name" not-null="true" />
<property name="private" not-null="true" />
<set name="subFolders" outer-join="false" cascade="none">
<key column="parentId" />
<one-to-many class="ClauseFolderImpl" />
<filter name="folderFilterLimited" />
<filter name="folderFilter" />
</set>
<filter name="folderFilterLimited" />
<filter name="folderFilter" />
</class>
<filter-def name="folderFilterLimited" condition="(parentId is null or (languageId = :languageId and procedureTypeId = :procedureTypeId))" >
<filter-param name="languageId" type="int" />
<filter-param name="procedureTypeId" type="int" />
</filter-def>
<filter-def name="folderFilter" condition="(parentId is null or private = :isPrivate)">
<filter-param name="isPrivate" type="boolean" />
</filter-def>
{code}
As Hibernate ues DTD to check the validity of configuration file, the {{<filter-def>}} definitions can't be moved to the beginning of the configuration file. The possible walkaround is to define filters in another file, and include it first:
{code:xml|title=hibernate-configuration.xml|borderStyle=solid}
<hibernate-configuration>
<session-factory>
...
<mapping resource="filters.hbm.xml"/> <!-- only filter-def's here -->
<mapping resource="clauses.hbm.xml"/>
...
</session-factory>
</hibernate-configuration>
{code}
Relative issue is [http://opensource.atlassian.com/projects/hibernate/browse/HHH-1182#action... HHH-1182].
--
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, 5 months