I'm having the opposite issue with CAS 6.3.2

My table and column names in db are snake_case.
My classes and properties are CamelCase.
Cas is simply lower casing the names and they are not found in the db

I have a custom database source that I want to use CamelCase to SnakeCase. 
So I created my own naming strategy class. But it is not being picked up.
custom.mydbsource.physical-naming-strategy-class-name=org.apereo.cas.hibernate.CustomSnakecasePhysicalNamingStrategy

In my DataSource setup, do I have to explicitly need to read this property 
and call a setter for it?

I do not wish to change the naming strategy for all my db sources 
especially for those used and maintained by CAS. I only want to use this 
custom naming strategy on my custom datasource.

-psv



On Thursday, March 11, 2021 at 10:26:55 PM UTC-6 Andy Ng wrote:

> Hi all,
>
> During migration from CAS 5 to CAS 6, I encountered an issue:
>
>    - My consent table, originally called `ConsentDecision` , is now 
>    renamed to `Consent_Decision`
>    - Moreover, the fields name is also changed, same pattern
>
> We have found a solution and want to share here:
>
>    - it is actually changes in *Spring boot* library behavior, detail see 
>    this 
>       - 
>       
> https://stackoverflow.com/questions/29087626/entity-class-name-is-transformed-into-sql-table-name-with-underscores
>    - Adding this properties should work now:
>       - 
>       
> spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
>       
> Add this here in case other encounter same issue, cheers!
>
> Regards,
> Andy
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/a683fa72-2c67-4415-ad08-2a502a9b76d1n%40apereo.org.

Reply via email to