logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
sweeperqb  
#1 Posted : Friday, June 11, 2021 4:49:40 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
I started tinkering with the source today by trying to update the NuGet packages. I ran into the following issue:

1) When I updated Castle.Core to the latest version, I received a version mismatch. It looks like NHibernate.Bytecode.Castle.dll relies specifically on Castle.Core v4.1.1. This library was included directly via the /Lib folder rather than via a NuGet package. When I looked at the dependencies of NHibernate.Bytecode.Castle package in NuGet, it appeared to be older than what is included in the /Lib directory. Where did this version of NHibernate.Bytecode.Castle come from?

2) I tried to update to the latest version of NHibernate. It looks like beginning with version 5.2.0 they changed the way they eager fetch with QueryOver. Unfortunately, I cannot find documentation on the new syntax, so the highest I can go is 5.1.7 without breaking the AC repositories. How big of a priority is it for AC to use the latest supported versions of libraries in their code? We get a little nervous about potential security issues when things start falling too far behind.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

mazhar  
#2 Posted : Wednesday, June 16, 2021 9:16:27 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Quote:
1) When I updated Castle.Core to the latest version, I received a version mismatch. It looks like NHibernate.Bytecode.Castle.dll relies specifically on Castle.Core v4.1.1. This library was included directly via the /Lib folder rather than via a NuGet package. When I looked at the dependencies of NHibernate.Bytecode.Castle package in NuGet, it appeared to be older than what is included in the /Lib directory. Where did this version of NHibernate.Bytecode.Castle come from?


Looks like we need to clean up this old reference which is no longer needed. In the older version of Nhibernate probably before 3.3, you had to use the Byte Code proxy. In later releases, they made it part of the NHibernate assembly itself so you don't have to use external DLL. If you look at the Website/bin folder you will notice that this DLL is never copied to the bin folder and is not in use. We overlooked the dead reference in CommerceBuilder project, thanks for pointing it.

Quote:

2) I tried to update to the latest version of NHibernate. It looks like beginning with version 5.2.0 they changed the way they eager fetch with QueryOver. Unfortunately, I cannot find documentation on the new syntax, so the highest I can go is 5.1.7 without breaking the AC repositories. How big of a priority is it for AC to use the latest supported versions of libraries in their code? We get a little nervous about potential security issues when things start falling too far behind.


The package updates are important but we would also want to make sure that things are stable when we upgrade any packages. I did a test upgrade a while ago to 5.3.6. You are correct about eager loads, I had to update the code to run the tests. I found an issue with that particular release, which was reported and later resolved by Nhibernate Team in 5.3.7. We will definitely like to make the package upgrades when we find it's viable for the application.

Edited by user Wednesday, June 16, 2021 11:20:02 AM(UTC)  | Reason: Not specified

sweeperqb  
#3 Posted : Wednesday, June 16, 2021 9:35:54 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Mazhar, thank you for clearing that up. I had not realized that the Bytecode provider was not being copied to the bin directory. Now it makes sense why I cannot find a newer version :)

I'm glad to hear package updates are a priority and that NHibernate had a specific issue that prevented upgrade, but was reported and hopefully fixed.
mazhar  
#4 Posted : Wednesday, June 16, 2021 11:17:01 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
BTW I updated the eager loads as below for my upgrade test

deprecated code
Code:

ICriteria productOptionsCriteria = (ICriteria)criteria.Clone();
            productOptionsCriteria.SetFetchMode("ProductOptions", FetchMode.Eager)
                .Future<Product>();


updated code
Code:

ICriteria productOptionsCriteria = (ICriteria)criteria.Clone();
            productOptionsCriteria.Fetch(SelectMode.Fetch, "ProductOptions")
                .Future<Product>();


Also, you may see the compiler complaining about session.Transaction property which is replaced with a method

deprecated code
Code:

session.Transaction


updated code

Code:

session.GetCurrentTransaction()


Quote:
but was reported and hopefully fixed.

Yes for that I appreciate the Nhibernate development team, the issue was addressed in 5.3.7 and can be seen in their release notes.

UPDATE: I was testing against 5.3.6 and the fix was made in 5.3.7.

Edited by user Wednesday, June 16, 2021 11:34:30 AM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.