Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Insert with where clause
 

Pages: 1
LLBLGen Pro Runtime Framework
Insert with where clause
Page:1/1 

  Print all messages in this thread  
Poster Message
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 20-Jun-2013 23:48:08.  
What's the best way to insert an entity only if there's a related row in the database with a particular column value. Something like this imaginary query...

Code:

INSERT INTO Foo (Id, col1) VALUES (4, 1)
INNER JOIN Bar ON Foo.Id = Bar.Id
WHERE Bar.Status = 1
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8110 posts
# Posted on: 21-Jun-2013 07:51:11.  
That is not supported (passsing a IRelationPredicateBucket into an adapter.Save action). As I see it, the options are:

A. Check for the restriction before the insert.
B. Do it at DB trigger level.


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 21-Jun-2013 10:06:53.  
In t-sql I reckon it could be done using SELECT INTO.
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14585 posts
# Posted on: 21-Jun-2013 10:57:27.  
Unfortunately not supported.

  Top
Pages: 1  


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

Version: 2.1.12172008 Final.