-->
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: Is it possible to load secondary tables lazily?
PostPosted: Wed Jan 16, 2008 8:31 am 
Beginner
Beginner

Joined: Wed Jan 16, 2008 8:16 am
Posts: 23
I'm trying to explain my problem with an example:

Code:
@Entity
@SecondaryTables({
  @SecondaryTable(name="TABLE_A", ...),
  @SecondaryTable(name="TABLE_B", ...)
})
public class Example extends Base {

  @Column(name = "a", table="TABLE_A")
  private String a;

  @Column(name = "b", table="TABLE_B")
  private String b;

}


I'm working on a legacy database. As the tables are not organized perfect, I want to use each possibility to gain performance.

What do I want for this example: The generated sql query should not use all secondary tables by default. The using of tables should depend on which properties are selected. For the query
Code:
select e.a from example
the table TABLE_B should not be used. Only table TABLE_A should be joined with the table of the Base class.

Is this possible?


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.