-
Notifications
You must be signed in to change notification settings - Fork 934
Add support for caching fetched relations with Criteria #2090
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
Merged
fredericDelaporte
merged 10 commits into
nhibernate:master
from
bahusoid:criteriaFetchCache
Apr 6, 2020
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b971b1e
Add support for caching fetched relations with Criteria
bahusoid 64f644c
Fix unsupported by CI modifier
bahusoid d83f4b4
Cache tuple without transformation for queries with fetches
bahusoid 07bef22
Adjust test for Oracle and slight refactoring
bahusoid e1f238d
ignore test for oracle
bahusoid 8cc7303
Another attempt to fix Oracle
bahusoid f512086
Do some cleanup
fredericDelaporte 4bb93d2
Merge branch 'master' into criteriaFetchCache
fredericDelaporte 7dba7e2
Revert a wording change
fredericDelaporte f72135e
Fix wording
bahusoid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
src/NHibernate.DomainModel/Northwind/Entities/NorthwindQueryOver.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using NHibernate.Linq; | ||
|
||
namespace NHibernate.DomainModel.Northwind.Entities | ||
{ | ||
public class NorthwindQueryOver | ||
{ | ||
private readonly ISession _session; | ||
|
||
public NorthwindQueryOver(ISession session) | ||
{ | ||
_session = session; | ||
} | ||
|
||
public IQueryOver<Customer, Customer> Customers | ||
{ | ||
get { return _session.QueryOver<Customer>(); } | ||
} | ||
|
||
public IQueryOver<Product, Product> Products | ||
{ | ||
get { return _session.QueryOver<Product>(); } | ||
} | ||
|
||
public IQueryOver<Shipper, Shipper> Shippers | ||
{ | ||
get { return _session.QueryOver<Shipper>(); } | ||
} | ||
|
||
public IQueryOver<Order, Order> Orders | ||
{ | ||
get { return _session.QueryOver<Order>(); } | ||
} | ||
|
||
public IQueryOver<OrderLine, OrderLine> OrderLines | ||
{ | ||
get { return _session.QueryOver<OrderLine>(); } | ||
} | ||
|
||
public IQueryOver<Employee, Employee> Employees | ||
{ | ||
get { return _session.QueryOver<Employee>(); } | ||
} | ||
|
||
public IQueryOver<ProductCategory, ProductCategory> Categories | ||
{ | ||
get { return _session.QueryOver<ProductCategory>(); } | ||
} | ||
|
||
public IQueryOver<Timesheet, Timesheet> Timesheets | ||
{ | ||
get { return _session.QueryOver<Timesheet>(); } | ||
} | ||
|
||
public IQueryOver<Animal, Animal> Animals | ||
{ | ||
get { return _session.QueryOver<Animal>(); } | ||
} | ||
|
||
public IQueryOver<Mammal, Mammal> Mammals | ||
{ | ||
get { return _session.QueryOver<Mammal>(); } | ||
} | ||
|
||
public IQueryOver<User, User> Users | ||
{ | ||
get { return _session.QueryOver<User>(); } | ||
} | ||
|
||
public IQueryOver<PatientRecord, PatientRecord> PatientRecords | ||
{ | ||
get { return _session.QueryOver<PatientRecord>(); } | ||
} | ||
|
||
public IQueryOver<State, State> States | ||
{ | ||
get { return _session.QueryOver<State>(); } | ||
} | ||
|
||
public IQueryOver<Patient, Patient> Patients | ||
{ | ||
get { return _session.QueryOver<Patient>(); } | ||
} | ||
|
||
public IQueryOver<Physician, Physician> Physicians | ||
{ | ||
get { return _session.QueryOver<Physician>(); } | ||
} | ||
|
||
public IQueryOver<Role, Role> Role | ||
{ | ||
get { return _session.QueryOver<Role>(); } | ||
} | ||
|
||
public IQueryOver<IUser, IUser> IUsers | ||
{ | ||
get { return _session.QueryOver<IUser>(); } | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.