Use avatarType field + JDBC for photo URL generation to handle Hibernate proxies

FixSecurityService
Shipped
19 de abril de 2026 às 00:56 UTC
Author
Kamo
Commit
62ceff0

**************** previously used instanceof AvatarPhoto to determine avatar type and cast to read fileExtension. When Hibernate returns a base-class proxy (e.g. via lazy association), instanceof fails and no URL is generated. Fix mirrors the pattern already in **************** - Read type from avatar.getAvatarType() field first, instanceof as fallback - Fetch file_extension via JDBC instead of casting to AvatarPhoto subtype **************** line for "type" field similarly fixed to use getAvatarType() before falling back to instanceof.

All changes

Como o que vês no transporte?

Cada uma dessas atualizações pousa automaticamente em seu espaço de trabalho. Comece grátis e veja crescer semana após semana.

Começar Livre Para SempreVer Preços