Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> 'Newbie' hits another Brick Wall ... and it begins to hurt
 

Pages: 1
LLBLGen Pro Runtime Framework
'Newbie' hits another Brick Wall ... and it begins to hurt
Page:1/1 

  Print all messages in this thread  
Poster Message
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 25-May-2006 14:55:24.  
In my designer I see the following:-

Entity: Booking
Relations: Booking - Passenger (1:n)
Booking - Service (1:n)

Entity: Service
Relations: Service - ServicePrice (1:n) - for every service there are 1 or more prices.

I've been happily doing Booking.Passenger.Add( passenger)
booking.Service.Add( service )

and saving recursively. But when I try to do

booking.service.serviceprice.add( serviceprice )

this doesn't seem to be possible.
Why not, and if not what do I have to do to get it to work.




  Top
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 25-May-2006 14:59:23.  
Forget this guys ... did this in haste ... the brick wall wasn't there at all, or if it was it was a delusion.




  Top
JimFoye
User



Location:
Austin, TX
Joined on:
22-Jun-2004 04:03:11
Posted:
656 posts
# Posted on: 25-May-2006 16:12:27.  
Ok, but that was an awesome title for your post!
  Top
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 25-May-2006 16:33:01.  
... wasn't meant to be like that. Maybe a bit of paranoia set it. I went with this tool with a 'gut feel' that it was a good candidate for the job, looked at other ORM tools and thought that this had a bit mor to offer.

Indeed it does has a lot more. Just that the learning curve can be quite steep and the brick walls can make you unproductive ... not a situation I'm used to.




  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14464 posts
# Posted on: 25-May-2006 16:42:56.  
Believe me, once you pass that learning soon (and it will be sooner than you expect) you'll be flying like a rocket Regular Smiley
  Top
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 25-May-2006 18:21:17.  
Help me fly man ... I'm grounded.

I thought this recursive save would be easy.

Booking has passengers
Booking has Services
Services have prices
All 1:n relationships

Adding passenger and service to booking and doing a recursive save works fine.

However, as soon as I add a ServicePrice entity I run into problems:=

An unhandled exception of type 'SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException' occurred in bl.dll

Additional information: An exception was caught during the execution of an action query: Cannot insert the value NULL into column 'Service_ID', table 'Yatra.dbo.ServicePrice'; column does not allow nulls. INSERT fails.
The statement has been terminated.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.

Now recursive saves should assign this fkey value because PK Service.Service_ID has a value.

Any thoughts before I shoot myself !!!!


  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37377 posts
# Posted on: 25-May-2006 20:05:48.  
Recursive saves work when you assign the entities to eachother. Did you do:
myService.Prices.Add(myPrice) ?

PLease post some (not 1000's of lines Wink ) code which constructs the graph and saves it so we can tell you what you might did wrong.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 26-May-2006 03:34:04.  
Apologies for this. It does indeed work as expected.




  Top
Pages: 1  


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

Version: 2.1.12172008 Final.