These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Property per SQL Query füllen?
PostPosted: Wed Jan 24, 2007 6:24 am 
Newbie

Joined: Wed Jan 24, 2007 6:18 am
Posts: 1
Hallo,

ich würde gerne eine Property per SQL Query füllen lassen, wobei das Query im Mapping definiert sein soll. Ist so etwas möglich?

Beispiel: Eine Klasse Buch hat eine Integer Variable bewertung.
Jetzt möchte ich bewertung beim Abruf von session.get(Buch.class,1) automatisch füllen lassen durch die Bewertungen aus einer anderen Tabelle, die erst noch zusammengefasst werden müssen (per avg).
Ist das möglich so etwas im Mapping für Buch zu implementieren?


Gruß, Thilo


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 24, 2007 10:11 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
formula hilft hier vermutlich weiter. Alternativ kann man auch Mappings gegen Views bauen.

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.