Skip to content

Conversation

@bahusoid
Copy link
Member

@bahusoid bahusoid commented Apr 1, 2019

Follow up to #1922
To avoid accidental misuse with SelectMode.FetchLazyProperties new enum is called SelectMode.FetchLazyPropertyGroup (and not SelectMode.FetchLazyProperty)

Example of usage:

var entity = session.QueryOver<Entity>()
	.Fetch(
		SelectMode.FetchLazyPropertyGroup,
		 ec => ec.LazyProp1, ec => ec.LazyProp2, ec => ec.OtherEntity.LazyProp3)
	.Where(ec => ec.Id == id)
	.SingleOrDefault();

Fixes #1861

@hazzik
Copy link
Member

hazzik commented Jun 17, 2019

To avoid accidental misuse with SelectMode.FetchLazyProperties new enum is called SelectMode.FetchProperty (and not SelectMode.FetchLazyProperty)

What about changing name of the new value to FetchLazyPropertyGroup and old one to FetchAllLazyProperties (added "all")?

@hazzik
Copy link
Member

hazzik commented Jun 17, 2019

The commit with proposed changes is here: 6f38e03.

@bahusoid
Copy link
Member Author

FetchLazyPropertyGroup looks good and it makes it visually distinguishable with FetchLazyProperties. Renaming seems unnecessary to me. But no objections.

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.

Lazy loading and Eager initialization for Component

3 participants