Skip to content

Instantly share code, notes, and snippets.

@timothyklim
Forked from natbusa/buddyentity.scala
Created May 24, 2013 06:00
Show Gist options
  • Select an option

  • Save timothyklim/5641546 to your computer and use it in GitHub Desktop.

Select an option

Save timothyklim/5641546 to your computer and use it in GitHub Desktop.
package com.natalinobusa.jpa
import javax.persistence._
@Entity
@Table(name = "buddy")
class Buddy(first: String, last: String) {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
var id: Int = _
var firstName: String = first
var lastName: String = last
def this() = this (null, null)
override def toString = id + " = " + firstName + " " + lastName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment