Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Columns cannot be resolved!?
Columns cannot be resolved!? [message #433562] Sat, 25 February 2006 19:57 Go to next message
Vincent Jenks is currently offline Vincent Jenks
Messages: 27
Registered: July 2009
Junior Member
I'm having problems w/ the latest dali release (M1). I did the
walk-through, created a simple java project and a simple class w/ three
fields. I made it persistent (added the database and connected to it,
mysql 4.0) and as soon as I define it as an Entity I start having problems
w/ the annotations.

Here's my class:

package com.zambizzi;

import javax.persistence.Id;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity(name="UserEJB")
@Table(name="user")
public class UserEJB {
@Id
private int id;
private String username;
private String password;
public UserEJB() {
super();
// TODO Auto-generated constructor stub
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}

I have errors telling me:

Column "id" cannot be resolved
Column "username" cannot be resolved
Column "password" cannot be resolved

Am I doing something wrong? I created the table, it's there, and I can
browse it in the database explorer. :|

Thanks!
Re: Columns cannot be resolved!? [message #433567 is a reply to message #433562] Tue, 28 February 2006 19:12 Go to previous message
Shaun Smith is currently offline Shaun Smith
Messages: 197
Registered: July 2009
Senior Member
V. Jenks wrote:

> @Id
> private int id;
> private String username;
> private String password;

> I have errors telling me:

> Column "id" cannot be resolved
> Column "username" cannot be resolved
> Column "password" cannot be resolved


Those errors imply your table doesn't have columns that match the
attribute names. Use the persistence properties view to select the right
column names.

Shaun
Re: Columns cannot be resolved!? [message #575737 is a reply to message #433562] Tue, 28 February 2006 19:12 Go to previous message
Shaun Smith is currently offline Shaun Smith
Messages: 197
Registered: July 2009
Senior Member
V. Jenks wrote:

> @Id
> private int id;
> private String username;
> private String password;

> I have errors telling me:

> Column "id" cannot be resolved
> Column "username" cannot be resolved
> Column "password" cannot be resolved


Those errors imply your table doesn't have columns that match the
attribute names. Use the persistence properties view to select the right
column names.

Shaun
Previous Topic:Persistence perspective
Next Topic:Not able to add persistence of create EJV 3.0 Entity in Eclipse
Goto Forum:
  


Current Time: Thu Sep 18 19:57:14 GMT 2014

Powered by FUDForum. Page generated in 0.08358 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software