Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Eclipse JPA problem on a named query that doesn't have a problem
Eclipse JPA problem on a named query that doesn't have a problem [message #804855] Wed, 22 February 2012 23:24 Go to previous message
David Vree is currently offline David Vree
Messages: 44
Registered: July 2010
Member
As of today, I am getting the following JPA error in Eclipse Indigo SR1:

"The identification variable 'name' is not defined in the FROM clause."

on the following class that I haven't touched in weeks and that compiles and runs without issue:

@XmlRootElement(name = "namespace")
@XmlType(name = "namespace",
propOrder = { "name", "description" })
@NamedQueries({ @NamedQuery(name = "NamespaceImpl.findUniqueByName", query = "SELECT n FROM NamespaceImpl n WHERE name = ?1") })
@Entity
@Table(name = "namespc")
public class NamespaceImpl {

private String name;
private String description;

public NamespaceImpl(final String name, final String description) {
this.name = name;
this.description = description;
}

@XmlElement
@Column(nullable = false, unique = true, length = 20)
@Override
public String getName() {
return name;
}

@Override
public void setName(final String name) {
this.name = name;
}

@XmlElement
@Column(length = 80)
@Override
public String getDescription() {
return description;
}

@Override
public void setDescription(final String description) {
this.description = description;
}

public NamespaceImpl() {
super();
}
}

Something must have changed recently, but I don't know what. The project is built with Maven and has the JPA facet. The JPA Platform for the project is set to "Generic 2.0" and the implementation has been set to "disable library configuration".
 
Read Message
Read Message
Read Message
Previous Topic:Unable to generate JAXB classes
Next Topic:NPE in Indigo SR2 when adding JPA facet
Goto Forum:
  


Current Time: Sat May 25 10:53:11 EDT 2013

Powered by FUDForum. Page generated in 0.02276 seconds