title: some Hibernate Question
body: <p>I have 2 question 
  I wanna make Mysql table that have  charset utf8 but I don't know where I shoud set the setting.
  (I just have a hibernate.cfg.XMl no any .xml file for hibernate)
  i dun want set mysql.ini file that default setting was UTF-8 I wanna put this setting in my hibernate.</p>
  
  <p>second Question:
  I have this table:</p>
  
  <pre><code>CREATE TABLE `buildingtel` (
  `username` varchar(50) NOT NULL,
  `buildingname` varchar(50) NOT NULL,
  `tel` varchar(15) NOT NULL,
  PRIMARY KEY (`username`,`buildingname`,`tel`),
  KEY `FK_buildingtel_2` (`buildingname`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>How can i Map these to and Java entity
  I can do like this:</p>
  
  <pre><code>@Entity
  @Table(name = "btel")
  public class Btel {
  
  @Id
  @GeneratedValue
  @Column(name = "id")
  private int id;;
  @Column(name = "username", length=50)
  private String username;
  @Column(name = "buildingname", length=50)
  private int buildingname;
  @Column(name = "tel", length=15)
  private int tel;
  //some setter &amp; getter
  }
  </code></pre>
  
  <p>but i want to set (<code>username</code>,<code>buildingname</code>,<code>tel</code>) together as a primary key how I can do it by annotation in hibernate</p>
  
  <p>TanX in advance</p>