Hi,
The exact problem that I am facing is quoted below
"A JPA error occurred (Unable to build EntityManagerFactory):
collection foreign key mapping has wrong number of columns:
models.License.value type: component[id,id]" . I ma not able to find
nyhing related on web. Any idea as to what is the problem here. The
corresponding model classes are given below:-
package models;
import java.util.*;
import javax.persistence.*;
import play.data.validation.*;
import play.db.jpa.*;
@Entity
public class Property extends Model {
@Id
String name;
String type;
@OneToMany
List<Value> value;
public Property(String name, String type) {
this.name = name;
this.type = type;
value = new ArrayList<Value>();
}
}
package models;
import java.util.*;
import javax.persistence.*;
import play.data.validation.*;
import play.db.jpa.*;
@Entity
public class Value extends Model{
String value;
public Value(String value){
this.value = value;
}
}
package models;
import java.util.*;
import javax.persistence.*;
import play.data.validation.*;
import play.db.jpa.*;
@Entity
public class License extends Model {
@Id
Long id;
@OneToMany
List<Value> value;
public License(Long id){
this.id = id;
value = new ArrayList<Value>();
}
}
Thanks
On Aug 12, 10:48 am, Sebastien Cesbron <
scesb...@gmail.com> wrote:
> Hi
>
> FK constraint are not in the scope of play but are a matter of db (and a bit
> of jpa, depends on what is your problem). You can find more informations
> from doc on these products
>
> Regards
> Seb
>
> 2011/8/11 Abhishek Mahawar <
mahawar.a...@gmail.com>