• Post Reply Bookmark Topic Watch Topic
  • New Topic

save interface and not entity- is it possible?  RSS feed

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I want my dao to get interface of the entity and not the entity. Like this:

public void save(ICustomer customer){
session.save("CustomerEntity",customer);
}

If i pass instance of CustomerEntity its ok, how ever if i pass another implemantation of ICustomer (not mapped entity) i fail.The implematation that i send has the same structre like CustomerEntity .

Thank you
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!