Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> UNION
 

Pages: 1
LLBLGen Pro Runtime Framework
UNION
Page:1/1 

  Print all messages in this thread  
Poster Message
Alex Davidson
User



Location:
Bristol, UK
Joined on:
18-Sep-2006 17:51:08
Posted:
21 posts
# Posted on: 22-Nov-2006 14:50:20.  
We have twelve similar tables which share a certain group of fields. These fields have exactly the same names and types in all of these tables. We need to construct a query that returns selects these fields from several of the tables and returns them as a single result set.

Is there any way to do this in LLBLGen? I know it can be done by using a supertable for the common fields, but inheritance isn't a viable solution in this case.
  Top
jbb
User



Location:

Joined on:
29-Nov-2005 13:38:48
Posted:
267 posts
# Posted on: 22-Nov-2006 15:02:02.  
Hello,

do you use the adapter or the selfservice scenario?
If it's all the time the same request on the twelve table, you can use the Fields Mapped on related fields in the designer to create a type list that will contain all the fields you want.



  Top
Alex Davidson
User



Location:
Bristol, UK
Joined on:
18-Sep-2006 17:51:08
Posted:
21 posts
# Posted on: 22-Nov-2006 15:33:58.  
We use the Adapter.

We don't use the designer, though. The database and LLBLGen configuration is programmatically generated. So it looks like time to add features to that generator... Tongue
  Top
bclubb
User



Location:
Norman, Oklahoma
Joined on:
12-Feb-2004 22:18:04
Posted:
934 posts
# Posted on: 23-Nov-2006 02:04:05.  
Take a look at using dynamic lists. You can form one result from many sources. Let us know if this will work.

  Top
Alex Davidson
User



Location:
Bristol, UK
Joined on:
18-Sep-2006 17:51:08
Posted:
21 posts
# Posted on: 23-Nov-2006 11:24:36.  
Again, it appears to require that each column of the final result set map to a single field on a single entity.

Inheritance certainly appears to be the only way to get around the UNION requirement. In fact, we've decided that our object model would actually result in faster database queries using inheritance; we've got enforcable foreign key relations defined on every join we'll be making, and the results do not need to be unique. Doing everything in one SELECT without any UNIONs would be quicker, even if we do end up with a few giant tables, eg. for storing audit histories.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38044 posts
# Posted on: 23-Nov-2006 11:34:48.  
well, UNION isn't supported so any combination of select statements has to be done outside the db: you've to combine results into the same resultbucket. I dont' see why inheritance would solve a UNION related problem though.

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Alex Davidson
User



Location:
Bristol, UK
Joined on:
18-Sep-2006 17:51:08
Posted:
21 posts
# Posted on: 27-Nov-2006 14:22:57.  
Using inheritance, the data being selected can all be placed in one table.

This also makes our key constraints a little simpler.
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.