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

Set which entities classes should never be cached, even indirectly #2744

Merged
merged 19 commits into from
Mar 20, 2022

Conversation

gokhanabatay
Copy link
Contributor

@gokhanabatay gokhanabatay commented May 2, 2021

Hi,
When Second level cache enabled "never" cached entities should not interact with UpdateTimestampsCache(#2735), for backward compability as discussed here new Cache Strategy added.

After release I could implement FluentNHibernate

maca88
maca88 previously approved these changes May 30, 2021
@gokhanabatay
Copy link
Contributor Author

@maca88 as community will you add this new feature to next minor release?

Also when merge of this pull request, #2130 pull request could be declined

@maca88
Copy link
Contributor

maca88 commented Jun 3, 2021

@maca88 as community will you add this new feature to next minor release?

In case other NHibernate members will also approve it, it will be most likely included in the next minor release.

@gokhanabatay
Copy link
Contributor Author

gokhanabatay commented Jun 16, 2021

@maca88 as community will you add this new feature to next minor release?

In case other NHibernate members will also approve it, it will be most likely included in the next minor release.

@fredericDelaporte @hazzik @bahusoid @gliljas could you please review these feature?

@gokhanabatay
Copy link
Contributor Author

@maca88 no members other than you paid attention to this pr? How can we continue? Is it normal procedure?

@hazzik
Copy link
Member

hazzik commented Jun 21, 2021

I’ve paid attention, but I don’t have enough expertise to properly review that fast. It would take longer for me to do proper review.

Copy link
Member

@fredericDelaporte fredericDelaporte left a comment

Choose a reason for hiding this comment

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

I agree with this PR overall. Some minor adjustments are needed.

src/NHibernate/Action/BulkOperationCleanupAction.cs Outdated Show resolved Hide resolved
src/NHibernate/Action/BulkOperationCleanupAction.cs Outdated Show resolved Hide resolved
src/NHibernate/Action/BulkOperationCleanupAction.cs Outdated Show resolved Hide resolved
src/NHibernate/Engine/ISessionFactoryImplementor.cs Outdated Show resolved Hide resolved
src/NHibernate/Loader/Custom/CustomLoader.cs Outdated Show resolved Hide resolved
src/NHibernate/Loader/Custom/CustomLoader.cs Outdated Show resolved Hide resolved
src/NHibernate/Loader/Custom/CustomLoader.cs Outdated Show resolved Hide resolved
src/NHibernate/Loader/Loader.cs Outdated Show resolved Hide resolved
src/NHibernate/Loader/Loader.cs Outdated Show resolved Hide resolved
@gokhanabatay
Copy link
Contributor Author

Any updates on this issue, how can I help?

gokhan.abatay@gmail.com and others added 10 commits January 16, 2022 01:35
… default true it could be disabled via query.throw_never_cached option
Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/BulkOperationCleanupAction.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/BulkOperationCleanupAction.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Engine/ISessionFactoryImplementor.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Loader/Custom/CustomLoader.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Impl/SessionFactoryImpl.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Impl/SessionFactoryImpl.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/BulkOperationCleanupAction.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Loader/Custom/CustomLoader.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Loader/Custom/CustomLoader.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Loader/Loader.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Loader/Loader.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/BulkOperationCleanupAction.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/BulkOperationCleanupAction.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/CollectionAction.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/EntityAction.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Action/ICacheableExecutable.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Cache/CacheFactory.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Cfg/Environment.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Engine/ActionQueue.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Hql/Ast/ANTLR/Tree/DotNode.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Hql/Ast/ANTLR/Tree/DotNode.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Hql/Ast/ANTLR/Tree/DotNode.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Loader/Custom/CustomLoader.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>

Update src/NHibernate/Loader/Custom/CustomLoader.cs

Co-authored-by: Frédéric Delaporte <12201973+fredericDelaporte@users.noreply.github.com>
@maca88
Copy link
Contributor

maca88 commented Jan 16, 2022

Squashed some commits and rebased.

And regenerate the Hbm file.
[System.CodeDom.Compiler.GeneratedCodeAttribute("HbmXsd", "5.0.0-Alpha1")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("HbmXsd", "5.4.0-dev")]
Copy link
Member

Choose a reason for hiding this comment

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

Granted, regenerating it is a bit noisy.

Comment on lines -985 to +989

Copy link
Member

Choose a reason for hiding this comment

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

But it does still avoid introducing formatting discrepancies which would could other noises on subsequent regeneration.

Comment on lines +430 to +433

/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("never")]
Never,
Copy link
Member

@fredericDelaporte fredericDelaporte Jan 23, 2022

Choose a reason for hiding this comment

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

Here the "by hand" writing of the code was also lacking the (almost) empty blank line. (I write "almost" because the generator does put spaces in it.)

@gokhanabatay
Copy link
Contributor Author

We are going through a very busy time, I see mentions today sory for that @fredericDelaporte.
When will we add this feature to "fluent nhibernate" package? Can we use fluent nhibernate from myget nuget store?

@fredericDelaporte
Copy link
Member

There is no MyGet currently for FluentNHibernate.

@fredericDelaporte
Copy link
Member

It seems this PR is awaiting reviews from @bahusoid and @gliljas. If you want a functional view of what have been done, have a look at the changes in the documentation.

Copy link
Member

@bahusoid bahusoid left a comment

Choose a reason for hiding this comment

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

@fredericDelaporte
I don't think you should wait for requested reviews unless it was self requested.

It's already been reviewed and approved by you and maca88. Seems quite enough for me. Plus I don't have much time - better spend it on some other issues

@fredericDelaporte fredericDelaporte added this to the next minor milestone Mar 13, 2022
@fredericDelaporte fredericDelaporte changed the title Never Cached Entities should not interact with UpdateTimestampsCache Set which entities classes should never be cached, even indirectly Mar 13, 2022
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.

None yet

6 participants