Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A possible violation of specificaton #3457

Open
tohidemyname opened this issue Nov 29, 2023 · 2 comments
Open

A possible violation of specificaton #3457

tohidemyname opened this issue Nov 29, 2023 · 2 comments

Comments

@tohidemyname
Copy link

The bug was reported to hibernate:
https://hibernate.atlassian.net/browse/HHH-10341

I did not find the documentation for the .Net version. Please correct me if Nhibernate follows other specifications.

In hibernate, the buggy code is as follows:
hibernate/hibernate-orm@04f1fcc

private void initAliases(SelectExpression[] selectExpressions) {
...
for ( int i = 0; i < selectExpressions.length; i++ ) {
String alias = selectExpressions[i].getAlias();
aliases[i] = alias == null ? Integer.toString( i ) : alias;
}
...
}
The fixed code is as follows:

private void initAliases(SelectExpression[] selectExpressions) {
...
for ( int i = 0; i < selectExpressions.length; i++ ) {
aliases[i] = selectExpressions[i].getAlias();
}
...
}

The latest code of NHibernate is as follows:
private void InitAliases(List selectExpressions)
{
...
for (int i = 0; i < selectExpressions.Count; i++)
{
string alias = selectExpressions[i].Alias;
_aliases[i] = alias ?? i.ToString();
}...
}

The code is similar to the buggy code of hibernate, so this bug may exist in NHibernate.

@trivalik
Copy link

Here the fix in hibernate: hibernate/hibernate-orm@adf41c6
Here the test update: hibernate/hibernate-orm@f6aa53c

Could you evaluate?

@fredericDelaporte
Copy link
Member

Hello,

On NHibernate side, maintainers are all volunteers who do contribute according to their priorities and available time. There are no organization with employee having dedicated time for this. We highly prioritize changes having a well identified impact.

Checking fixes done on Hibernate side that would not be done on NHibernate could be a good way to detect latent troubles. But without additional analyses to evaluate whether that actually needs fixing for NHibernate too, or at least that "fixing likewise to Hibernate" would not break some specific feature of NHibernate, it will likely stay low priority for most contributors.

Contributing a PR with tests for the change as explained in contributing would help moving the subject forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants