John wrote:
> On Tuesday 02 March 2010 06:50:12 am Paul McNett wrote:
>> On 3/2/10 6:24 AM, John wrote:
>>> Not my tables/views.  And we aren't allowed to change anything.
>> Do they have valid reasons behind their policy? I'd call a meeting and say
>> "thanks but no thanks: you people are binding my hands for no reason".
>>
>> Paul
> 
> Even if we did have the PK field for the view we will still have issues.  For 
> example how does Dabo return the generated PK after an insert.  Recall that 
> the view in question allows inserts,  updates, and deletes.  But using the 
> Dabo's getLastInsertID () does not work for a view.   Standard Postgres 
> curval() (returns the last generated number) function requires the name of 
> the sequence used and the dbPostgres routine only works for a table.  So 
> dbPostgres does not know how to determine (in a dynamic way)  the sequence 
> name from a view (yet).  I wonder if other backends know how to determine the 
> generated PK from a view.
> 
> I'm going to see if there is a way to get that done.  But in the mean time I 
> just over wrote the save() method.
> 

If there is no reliable getLastInsertID() you would set the new PKs
before insert. That way you know how to retrieve the new record after an
insert.
If there is no way to retrieve the new record after an insert you have
lost the normal table behavior anyway.

Views should have the same behavior as a normal table.
Otherwise they can't be used in the same way.

Uwe


_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4b8d46be.8080...@googlemail.com

Reply via email to