title: Entity class with a composite primary key doesn't have getter and setter
body: <p>I have an entity class userdetails which has the username, userid (numeric) and password fields, with username and userid forming a composite primary key. This is negotiable, and possibly unimportant to the main problem.</p>
  
  <p>I have another class, connectiontable, which has userid as the primary key. The sql code used to generate the relevant tables is as follows:</p>
  
  <pre><code>create table usertable
  (
  userid int NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
  username varchar(128) NOT NULL UNIQUE,
  password varchar(128) NOT NULL, 
  CONSTRAINT USER_PK PRIMARY KEY(username, userid)
  
  );
  </code></pre>
  
  <p>That's the sql code for usertable. The following is for connectiontable</p>
  
  <pre><code>create table connectiontable
  (
  userid int not null,
  username varchar(128) not null,
  connections varchar(32670) not null,
  
  CONSTRAINT CONNECTION_PK PRIMARY KEY(username, userid),
  CONSTRAINT CONNECTION_FK FOREIGN KEY(username,userid) REFERENCES usertable(username,userid) 
  );
  </code></pre>
  
  <p>There are a bunch of other things in connectiontable, but those are irrelevant. I use netbeans 7.2.1 and Jave EE6. I use the 'create entities from database entries' but for some reason, I don't have a getter and setter for either userid or username. They are in connectiontablePK, but I can't seem to make use of that. For example, when I generate the jsf pages, I want to be able to do something like:</p>
  
  <pre><code>Connectiontable con = new Connectiontable();
  con.getUsername();
  </code></pre>
  
  <p>But it complains because it can't find that method in connectiontable.java.</p>
  
  <p>Can anyone advise me why this is the case, and how I can solve it? Thank you.</p>