Skip to content
Advertisement

Tag: orm

Symfony doctrine orderby and group by (distinct)

I am trying to get the latest booked courses (unique). I have tried the following with the Doctrine querybuilder: Without the orderby it works but it will traverse the bookings ascending. I need the latest booked courses. With this query I am getting this error: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not

Why does not Hibernate set @DynamicInsert by default

Could anyone explain to me why Hibernate does not set the @DynamicInsert annotation by default and allow entities to generate an INSERT based on the currently set properties? What’s the reason for not using @DynamicInsert and, therefore, including all entity properties by default? Answer What @jb-nizet said. Also, dynamic-insert=”true” is a bad idea in my book. Skipping null fields from

How to use money data type in Java, SQL, ORM

What are best practises in using money data type in Java application? Money should be in double variable? What about rounding, currencies and so on. Are special libraries for this? And what about ORM and SQL in most popular databases. As I know not in all SQL engines is Money data type. In that case NUMERIC(15,2), DECIMAL(15,2) or REAL data

Advertisement