From: Wojciech Sobczuk
Subject: UncommonSQL madness.
Date: 
Message-ID: <3D412FD7.7040100@nemo.pl>
Hello,

When calling (setf (client-email usr) ····@bar.com") on any view class 
instance, I get the following errors:

  (setq usr (sql:select 'client :where [= [slot-value 'client 'id] 1]))
  (setf (client-email usr) ····@bar.com")
  (sql:update-records-from-instance usr)

I get the following error:

Error in function PCL::CACHE-MISS-VALUES:
   The function #<Standard-Generic-Function ODCL:EC-EDIT (1)
                  {48AD7989}> requires at least 3 arguments

Backtrace:

0: (PCL::CACHE-MISS-VALUES
    #<Standard-Generic-Function ODCL:EC-EDIT (1) {48AD7989}>
    (#<KRL:CLIENT {48233F8D}> NIL)
    PCL::ACCESSOR)
1: (PCL::INITIAL-DFUN #<Standard-Generic-Function ODCL:EC-EDIT (1) 
{48AD7989}>
                      (#<KRL:CLIENT {48233F8D}> NIL))
2: (MAISQL-SYS::|(PCL::FAST-METHOD (SETF SLOT-VALUE-USING-CLASS) (T 
VIEW-METACLASS T T))|
    #<unused-arg>
    #<Closure Over Function "DEFUN 
MAKE-OPTIMIZED-STD-SETF-SLOT-VALUE-USING-CLASS-METHOD-FUNCTION" 
{48E7EA09}>
    "wefwefwefewf"
    #<View-Metaclass KRL:CLIENT {4883F5BD}>
    ...)
3: (MULTIPROCESSING::FN)
4: (MULTIPROCESSING::WITH-TIMEOUT-INTERNAL 120
                                           #<Closure Over Function 
MULTIPROCESSING::FN
                                             {496FDC59}>
                                           #<Closure Over Function 
MULTIPROCESSING::TF
                                             {496FDC69}>)
5: ("DEFUN KRL-PUBLISH" #<NET.ASERVE:HTTP-REQUEST {496FD5A5}>
    #<NET.ASERVE:COMPUTED-ENTITY {48D62015}>)
6: (NET.ASERVE::|(PCL::FAST-METHOD PROCESS-ENTITY (HTTP-REQUEST 
COMPUTED-ENTITY))|
    #<unused-arg>
    #<unused-arg>
    #<NET.ASERVE:HTTP-REQUEST {496FD5A5}>
    #<NET.ASERVE:COMPUTED-ENTITY {48D62015}>)
7: (NET.ASERVE::|(PCL::FAST-METHOD HANDLE-REQUEST (HTTP-REQUEST))|
    #<unused-arg>
    #<unused-arg>
    #<NET.ASERVE:HTTP-REQUEST {496FD5A5}>)
8: (NET.ASERVE::PROCESS-CONNECTION #<EXCL:BIVALENT-STREAM {48646DFD}>)
9: (NET.ASERVE::START-SIMPLE-SERVER)
10: (NET.ASERVE:START :PORT 8085 :HOST NIL ...)
11: (LISPWEB:START-SERVER :SETUID #<unused-arg> :SETGID #<unused-arg> ...)
12: (INTERACTIVE-EVAL (LISPWEB:SSS :PORT 8085))
13: (COMMON-LISP::%TOP-LEVEL)
14: (COMMON-LISP::RESTART-LISP)


What is going on?  Is this some bug?

Greetings,
Wojtek

From: Jochen Schmidt
Subject: Re: UncommonSQL madness.
Date: 
Message-ID: <ahrdk7$mkv$1@rznews2.rrze.uni-erlangen.de>
Wojciech Sobczuk wrote:

> Hello,
> 
> When calling (setf (client-email usr) ····@bar.com") on any view class
> instance, I get the following errors:
> 
>   (setq usr (sql:select 'client :where [= [slot-value 'client 'id] 1]))
>   (setf (client-email usr) ····@bar.com")
>   (sql:update-records-from-instance usr)

I'm not sure but does the select really return a single instance?
At least in CommonSQL one would have to do (caar (sql:select ...))

ciao,
Jochen

--
http://www.dataheaven.de
From: Wojciech Sobczuk
Subject: Re: UncommonSQL madness.
Date: 
Message-ID: <3D413C57.5000908@nemo.pl>
It returns a list, but if I (setq usr (make-instance 'client)) I get the 
same error.  Sorry for the buggy example.

Wojtek

Jochen Schmidt wrote:
> Wojciech Sobczuk wrote:
> 
> 
>>Hello,
>>
>>When calling (setf (client-email usr) ····@bar.com") on any view class
>>instance, I get the following errors:
>>
>>  (setq usr (sql:select 'client :where [= [slot-value 'client 'id] 1]))
>>  (setf (client-email usr) ····@bar.com")
>>  (sql:update-records-from-instance usr)
> 
> 
> I'm not sure but does the select really return a single instance?
> At least in CommonSQL one would have to do (caar (sql:select ...))
> 
> ciao,
> Jochen
> 
> --
> http://www.dataheaven.de
From: Wojciech Sobczuk
Subject: Re: UncommonSQL madness.
Date: 
Message-ID: <3D41408D.1020300@nemo.pl>
Phew, I've managed to fix it with some friendly help from #lisp'ers on 
openprojects.net.

It came out that the line:
       (ec-edit instance *default-editing-context* new-value))
looked like:
       (ec-edit instance *default-editing-context* ))
in sql/objects.lisp line 342.  Can I hope on this fix to be incorporated 
into the sources?

Greetings,
Wojtek

Wojciech Sobczuk wrote:
> It returns a list, but if I (setq usr (make-instance 'client)) I get the 
> same error.  Sorry for the buggy example.
> 
> Wojtek
> 
> Jochen Schmidt wrote:
> 
>> Wojciech Sobczuk wrote:
>>
>>
>>> Hello,
>>>
>>> When calling (setf (client-email usr) ····@bar.com") on any view class
>>> instance, I get the following errors:
>>>
>>>  (setq usr (sql:select 'client :where [= [slot-value 'client 'id] 1]))
>>>  (setf (client-email usr) ····@bar.com")
>>>  (sql:update-records-from-instance usr)
>>
>>
>>
>> I'm not sure but does the select really return a single instance?
>> At least in CommonSQL one would have to do (caar (sql:select ...))
>>
>> ciao,
>> Jochen
>>
>> -- 
>> http://www.dataheaven.de
> 
>