new int[] { 1 } means return first generated columns,in hibernate it's id column.