The moose likes Object Relational Mapping and the fly likes could not resolve property Error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "could not resolve property Error" Watch "could not resolve property Error" New topic
Author

could not resolve property Error

ambar patil
Ranch Hand

Joined: Nov 29, 2005
Posts: 226
Hi,
I am getting error:
could not resolve property: nutritionType of:

Object relationships are like these (I have include imp things) :
Recipe{
@OneToMany(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
@JoinColumn( name = "RECIPE_ID" )
public Set<RNutritionXref> getRnutritionxref()
...
}

RNutritionXref
{
private RecipeNutritionPK myPrimaryKey;
@Id
public RecipeNutritionPK getPrimarykey()
{
return myPrimaryKey;
}
...
}

RecipeNutritionPK{
private NutritionType myNutritionType;
@ManyToOne
@JoinColumn( name ="NUTRI_TYPE_ID",nullable = false)
public NutritionType getNutritionType()
{
return myNutritionType;
}
}

I am using like these :
select count(*) from Recipe recipe where recipe.preparationTimeInMinutes <= 10 and recipe.rnutritionxref.primarykey.nutritionType = 'protein' and recipe.rnutritionxref.measurementAmount >= 200

but getting error 'could not resolve property: nutritionType'
I am using hibernate 3 & spring
Need quick help/hint..

[ July 25, 2007: Message edited by: ambar patil ]

[ July 25, 2007: Message edited by: ambar patil ]
[ July 25, 2007: Message edited by: ambar patil ]
 
 
subject: could not resolve property Error
 
Threads others viewed
Problem with Hibernate test application
Data is not inserting
Error: Active Spring transaction synchronization required
Data deleted while getting data from table using hibernate.
Problems in JPA with a Collection of Dates
developer file tools