Skip to content
Advertisement

Tag: hibernate

What is a natural identifier in Hibernate?

While reading through the Hibernate documentation, I keep seeing references to the concept of a natural identifier. Does this just mean the id an entity has due to the nature of the data it holds? E.g. A user’s name + password + age + something are used as a compound identitifier? Answer In Hibernate, natural keys are often used for

How to map a PostgreSQL array with Hibernate

Has anyone successfully mapped a numeric array in PostgreSQL to a numeric array in Java via Hibernate? SQL: Mapping: Class: I get an exception when querying the table. Answer Hibernate does not support database arrays (e.g. ones mapped to java.sql.Array) out of the box. array and primitive-array types provided by Hibernate are for mapping Java arrays into backing table –

Display Hibernate Query in JTable

I’m seeking an efficient way to display an SQL table queried via Hibernate in a JTable. It would probably be preferable to use the List returned by that (In this case, that would make a list of Files objects (where Files is an internal class, not java.io.File)), but I won’t be picky as long as it is neat. I have

hibernate column name issues

I specifically need the above code to create a column named “DateOfBirth,” instead Hibernate gives me a column named date_of_birth. How can I change this? Is there a web.xml property? I came across DefaultNamingStrategy and ImprovedNamingStrategy, but not sure how to specify one or the other. Answer Here is a possible workaround: if you name it dateofbirth the column in

Advertisement