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

Test Case for Invalid SQL with property-ref on property using a formula #3309

Conversation

PapisKang
Copy link
Contributor

@PapisKang PapisKang commented May 27, 2023

The test case for #1313 is not complete yet cause i ve some troubles with the issue description.
The description of the issue defines a situation where a many to one relationship with property-ref is targetting a property having a formula.
But after spending a lot of time on the documentation, i feel like it s something that is not allowed anymore.
A formula is not a column in the database (it is just calculated), so i m asking how can i target a formula with a many to one relationship ? Also specifying both column and formula attributes is invalid
<property name="SerialNumber" unique="true" type="string" column="SerialNumber" formula="(select Id from Customer where Customer.Id = Id)" />

AnyWay, i tried to write a test case and i hope someone would help to understand what we re trying to do here.

…operty-ref targets a property which has a formula invalid sql is generated

The test case is not complete yet.
It seems that we cant target a property which has a formula with a many to one relationship
@PapisKang PapisKang changed the title GH3513 : Creating Test Case When a many-to-one relationship with a property-ref targets a property which has a formula invalid sql is generated GH-3513 : Creating Test Case When a many-to-one relationship with a property-ref targets a property which has a formula invalid sql is generated May 27, 2023
@fredericDelaporte fredericDelaporte changed the title GH-3513 : Creating Test Case When a many-to-one relationship with a property-ref targets a property which has a formula invalid sql is generated Test Case for Invalid SQL with property-ref on property using a formula May 27, 2023
}

[Test]
[Explicit("Not fixed yet")]
Copy link
Member

@fredericDelaporte fredericDelaporte Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not fixed yet, marking as explicit allows the test case to be ignored by the CI. This will have to be removed once the trouble is fixed.

@fredericDelaporte fredericDelaporte merged commit 2742b57 into nhibernate:master Feb 6, 2024
@PapisKang PapisKang deleted the GH3513-many-to-one-targetting-formula branch April 22, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants