-->
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.  [ 1 post ] 
Author Message
 Post subject: Mapping @Formulas only object
PostPosted: Sun Jan 06, 2013 7:17 pm 
Newbie

Joined: Wed Aug 08, 2007 11:28 pm
Posts: 4
I have an Mapped object that has several @Formula mappings in it. In most of the places, the mapped formulas
are not needed, but the queries are involved and so when fetching a list of objects, it's really slowing the query down.

I want to move all the @Formula mappings to a separate object. So if the mapped object is, say, a User, the new
object would be UserFormula and really only need a member var of User to map it back to the User object.

It would be one-to-one.

To make a traditional mapping, however, I'd need to create a table called UserFormula with just the single FK
reference back to user (so PK and then USER_ID). That seems lame. Is there a way to create the UserFormula
object without having to make it mapped? Or is there a way to not fire the @Formula fields on queries unless
expressly asked for? I looked at naming each field in the query and simply omitting the @Formula fields. That's
all I can think of. I was hoping that having a separate object of the @Formula fields would just let me fetch
that only when needed.

Thanks


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

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.