Question: I have a page with print button which prints a table. Now in Chrome or IE it works fine but in Firefox it does not show the table headers. Here are some screenshots of Chrome and Firefox.

In Firefox:

![In Firefox](https://i.stack.imgur.com/VBUxh.png)

In Chrome:

![In Chrome](https://i.stack.imgur.com/JgplS.png)

Answer: 
try using AUTO or IDENTITY policy.
like: 

```
@GeneratedValue(strategy = GenerationType.IDENTITY)

```
Here is the ID field definition in your entity class

```
@Id
@GeneratedValue
@Column(name = "customer_id", unique = true, nullable = false)
private int id;

```

**Here ID field is unique and not null**. So you must have to provide the data on ID field during insertion.

First of all, using annotations as our configure method is just a convenient method instead of coping the endless XML configuration file. 

The `@Id`annotation is inherited from `javax.persistence.Id`， indicating the member field below is the primary key of current entity. Hence your Hibernate and spring framework as well as you can do some `reflect` works based on this annotation. for details please check [javadoc for Id](http://docs.oracle.com/javaee/6/api/javax/persistence/Id.html) 

The `@GeneratedValue` annotation is to configure the way of increment of the specified column(field). 

For example when using `Mysql`, you may specify `auto_increment` in the definition of table to make it self-incremental, and then use 

```
@GeneratedValue(strategy = GenerationType.IDENTITY)

```