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

UtcDateTime expect date kind Utc but it is Unspecified #8635

Open
MatteoPiovanelli-Laser opened this issue Oct 21, 2022 · 1 comment
Open
Milestone

Comments

@MatteoPiovanelli-Laser
Copy link
Contributor

This kind of exception is thrown by somequery on the dev branch.

I've tracked it down, and it seems related to

public class UtcDateTimeConvention : IPropertyConvention, IPropertyConventionAcceptance {

(basically, if a property in a record is a DateTime and its name ends with "Utc", in NHibernate the type would be DateTimeType, rather than DateTimeType) and the fact that nHibernate version 5.x (that is in dev since January) enforces that type more strongly.

I have already tested locally a fix in a NHibernateExpressionVisitor that would allow Orchard to handle that cleanly and seems to work for all cases (all that I've been able to test).

I was wondering whether @sebastienros remembers if that convention there is important, because I have a feeling that removing it would also fix this issue.

@MatteoPiovanelli-Laser
Copy link
Contributor Author

MatteoPiovanelli-Laser commented Oct 21, 2022

Correction: removing the convention doesn't seem to work at all. I'm not sure why and can't investigate it right now.

@sebastienros sebastienros added this to the 1.10.x milestone Nov 3, 2022
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

2 participants