package com.tymiller.model;

import javax.persistence.Entity;

@Entity
public class Photo {

}

package com.tymiller.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class Photo {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long photoId;
}

add id field and generate id automatically