Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

could not resolve property Error

 
ambar patil
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic