Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [Newbie] Problems with createNativeQuery



Vackar wrote:
> 
> Could you post the code for the Platform class please.
> 
> Thanks,
> Vackar
> 
> 

Platform.java and the DDL used to create it;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the Platform database table.
 * 
 */
@Entity
@Table(name="Platform")

public class Platform implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	private int id;

	@Column(name="PlatformName", length=32)
	private String platformName;

	//bi-directional many-to-one association to PEcu
	@OneToMany(mappedBy="platform")
	private Set<PEcu> pecus;
		 
    public Platform() {
    	
    }

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPlatformName() {
		return this.platformName;
	}

	public void setPlatformName(String platformName) {
		this.platformName = platformName;
	}

	public Set<PEcu> getPecus() {
		return this.pecus;
	}

	public void setPecus(Set<PEcu> pecus) {
		this.pecus = pecus;
	}
	
}

CREATE TABLE ids2.Platform (
       id INT NOT NULL AUTO_INCREMENT
     , PlatformName VARCHAR(32)
     , PRIMARY KEY (id)
) ENGINE = InnoDB;
ALTER TABLE ids2.Platform MODIFY COLUMN PlatformName VARCHAR(32)
      COMMENT 'Platform Description';



-- 
View this message in context: http://www.nabble.com/-Newbie--Problems-with-createNativeQuery-tp25362312p25363342.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top