Questions tagged [naming-strategy]

Naming strategy represents organized way to assign names to various constructs such as database tables or entities.

10 questions
3
votes
1 answer

Prevent JMS Serializer to convert CamelCase to UnderscoreCase

i started an API Rest with symfony 4.2 and these bundle (FOSRestBundle, JMS Serializer Bundle). I have an Angular application which send many request with body who has property like firstName, but it doesn't match with my User property while its…
3
votes
1 answer

DefaultComponentSafeNamingStrategy with Spring Boot 2 JPA

I'm porting a legacy Spring 4.2.4 / Hibernate 4.3 application to Spring Boot 2.0.2. This application uses Hibernate's DefaultComponentSafeNamingStrategy. Naming strategies have changed with Spring Boot 2 / Hibernate 5.2. There is lots of…
Rens Verhage
  • 5,688
  • 4
  • 33
  • 51
2
votes
1 answer

Spring Boot multiple data source with SpringPhysicalNamingStrategy

Require Spring boot application with multiple data source configured. Multiple data source configuration is working with separate datasource, entityManager and transactionManager. Also hibernate naming configuration is working with single data…
1
vote
1 answer

JPA column with underscore - CustomPhysicalNamingStrategy is throwing NullPointer exeption

After some research , referring to these post i tried setting the custom naming strategy Hibernate Naming strategy JPA column with incorrect underscore Here is my custom naming Strategy public class CustomPhysicalNamingStrategy implements…
1
vote
1 answer

Naming Strategy for table and column names (Doctrine ORM)

Is it possible to have a naming strategy take care of mapping table and column names in Doctrine ORM? Right now all names are specified via annotation in the entity classes, e.g.
arueckauer
  • 349
  • 5
  • 19
0
votes
0 answers

how to create single session factory when using physical naming strategy in hibernates

i have a scenario where Iam mapping class Payload.java with physical naming strategy to tables Payload_1, Payload_2 up to Payload_100. all tables are in same database(psql DB). For now i am creating session factory for each table as i don't have…
0
votes
1 answer

Annotation shortcut (Hibernate's @Id, @GeneratedValue, @SequenceGenerator)

Code simplification needed. In our company we have patterns on how to create names for DB objects (see list below), these applies to all classes/tables, which results in tons of repeated code in every Entity class (see code example). I was able to…
Jan Zdrha
  • 373
  • 2
  • 11
0
votes
1 answer

Spring boot2 JPA naming strategy for SQLite

I want to implement spring boot 2 application with CrudRepository. I can`t figure out what going on with naming strategy in my application. When i call a method in repository (for example findAll()), it transforms the name of table in database, and…
-1
votes
1 answer

How to get the JsonConverterAttribute to use the same NamingStrategy as the JsonConvert.Deserialize function

I have the following class to serialize class Container { [JsonConverter(typeof(PropertyConverter))] public PropertyBase SomeProperty { get; set; } } Which is serialized with var settings = new JsonSerializerSettings { ContractResolver…
Jay
  • 3,373
  • 6
  • 38
  • 55
-1
votes
1 answer

PhysicalNamingStrategyStandardImpl JPA hibernate naming works for dev/local but not in testing

My table name is in camelcase and the hibernate (v5) naming is PhysicalNamingStrategyStandardImpl which works when running the application using @SpringBootApplication but when it is used in testing and using @DataJpaTest it turns the camelcase name…