Hi Leslie

I've just taken the blog app and made minimal changes needed to use
PostgreSQL.

With cl-prevalence, deletes work fine as you know (select one record,
and only that one is deleted).  But with the blog app on clsql-
postgresql-socket, I select one user to delete, then I get the
Confirmation - Delete 1 user? dialogue box, then it deletes them all.
Same as with my app.

So yes, the vanilla blog app exhibits the same behaviour as
postgresql.  Sounds like a bug.

The changes I made to the blog app  to switch from cl-prevalence to
clsql-postgresql-socket were:
* I changed the models to use clsql-def-view-class instead of defclass
and changed the slot specs for ID to (id :ACCESSOR ID :TYPE
INTEGER :INITARG :ID) on the assumption that the sequencer needs to
access the ID slot.  (The sequencer works fine by the way - adds work
without needing the ID populated, and in Postgresql the appropriate
sequence all OK)
* I also had to change the class "user" to another name (I made it
"youser" in honour of my country of residence :) - Postgresql won't
allow a table to be created with the name "user"
* Then I created the two tables (post and "youser") using clsql:create-
view-from-class from the loaded class definitions.
* The only other changes were stores.lisp of course for a postgres
connection string, and in blog.asd I added dependencies on :clsql
and :metatilities as is done in the weblocks-clsql-demo app.

I couldn't add posts because I haven't changed the blog app for
referential integrity yet, but hopefully that gives you enough to go
on.

Let me know anything else I can do to help narrow it down.

Many thanks
Chris

On Apr 1, 6:46 pm, "Leslie P. Polzer" <[email protected]>
wrote:
> Hi Chris (from up and above, i.e. Europe),
>
> > When my first shiny table popped up on a gridedit (very
> > exciting! ...I'm mimicking the blog sample app) I tried selecting a
> > row and hitting the delete button.  Result: every record in the table
> > was deleted.
>
> That looks like a serious bug that we should solve ASAP.
>
> > Looking at the code for the gridedit widget, I noticed the separate
> > "delete-action" file and wondered if it was something to do with the
> > use of dataedit-on-delete-items, but I'm a bit too new to weblocks to
> > figure it all out yet.
>
> > Can anyone tell me what I should be doing differently?
>
> Since it works fine for me using Prevalence I suppose that either
> your code has a mistake in it or that the CLSQL backend has a bug.
>
> Does the vanilla simple-blog example also exhibit this behavior
> with Postgres/CLSQL? And the weblocks-demo example?
>
> If not then please post your code here.
>
> If yes then just let me know and I'll check it out.
>
>   Leslie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to