Re: [Pharo-users] Glorp: Is there some way to do insert-or-update?

2017-08-22 Thread jtuchel
Herby,

as Esteban already said, UPSERT doesn't make any sense in an ORM. It either 
knows the object as one that has been read in this session or not. If not, 
it is new and needs to be inserted.

You could, of course, try and see what happens if you let Glorp's insert 
operation always issue an UPSERT. This is probably very easy to do and at 
first sight there isn't too much I could think of that could go wrong with 
it.

But I guess including a check for existence of an object as Esteban 
suggests isn't too bad from the performance and "safety" POV. not sure I 
understand how a Dictionary Mapping could help here

Joachim




Am Dienstag, 22. August 2017 12:13:30 UTC+2 schrieb Herbert Vojčík:
>
> Hello! 
>
> Is there some way to do insert-or-update operation (that is, roughly, to 
> be able to register an object with possibly existing primary key(s) and 
> let it be written regardless? 
>
> Thanks, Herby 
>
> P.S.: Use case - I want to have log of USER-DEVICE pairing with last 
> timestamp and 'enabled' field that would be set to false once push 
> notification fails - but set to true once user actually logs from the 
> device (again). I don't want to have many historical records, so I want 
> to have USER+DEVICE to be a composed primary key. Which means it is 
> inserted first time, but possibly updated later. 
>


Re: [Pharo-users] Pharo 5 and Seaside

2016-06-19 Thread jtuchel


Mark,

I am sure I didn’t load all prerequisites. That’s what I thought the Catalog 
Browser and its machinery would do for me. If I understand Esteban’s answer 
correctly, that is the idea, but for some changes that haven’t been reflected 
for Seaside3 yet, it didn’t work.

So I guess the snippet you provided is the way to go.

Thanks for answering and looking into this

Joachim

Von: Mark Bratcher
Gesendet: Sonntag, 19. Juni 2016 12:11
An: pharo-users@lists.pharo.org
Betreff: Re: [Pharo-users] Pharo 5 and Seaside

I'm running Pharo 5 on Windows. When I installed Seaside 3, I just used the 
instructions given for Gofer (entered in the Playground and executed there). I 
downloaded the base package:
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main';
package: 'ConfigurationOfSeaside3';
load.
((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load.
I also tried the alternative Gofer instructions shown, and they also worked 
without dependency error. So depending upon how you actually did your load of 
Seaside 3, maybe you didn't pull in all the dependent packages.
Mark

On 6/19/2016 4:31 AM, jtuc...@objektfabrik.de wrote:
Hi,

I just downloaded Pharo 5 from pharo.org clicked on the MacOS X button), opened 
the Catalog Browser and wanted to load / install Seaside. I must admit I didn't 
read anything before I did... ;-)
Here are a few remarks:
• Download and installation on OS X El Capitan went smoothly, just the usual 
security warning ion first opening. Since I know Pharo is no malware ( ;-) ), 
this was not an issue
• There are several entries for Seaside, most of them warn me they are not 
tested/blessed for Pharo 5. They do not have a "Pharo 5" tag. So they could 
possibly be ommitted in this default view?
• The "Seaside 3" entry seems to be the suitable one, but fails with "This 
package depends on the following classes:
  ContextPart"
• it is not really obvious what the difference between "install stable version" 
and "install stable version and create group" is. The word group is something 
without any meaning in the context of Smalltalk to me... I clicked on the 
top-most entry just because I thought it's first in the menu for a reason.
So I didn't really get far in this Sunday-morning-experiment :-(
Joachim



-- 
---
Objektfabrik Joachim Tuchel  mailto:jtuc...@objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1





Re: [Pharo-users] Blitzkrieg!

2015-01-19 Thread jtuchel
Sven,


I got Richard’s message about ESUG and I asked for facts. It seems you didn't 
read my full post…


Joachim






Von: Sven Van Caekenberghe
Gesendet: ‎Montag‎, ‎19‎. ‎Januar‎ ‎2015 ‎19‎:‎17
An: Any question about pharo is welcome






> On 19 Jan 2015, at 17:48, jtuc...@objektfabrik.de wrote:
> 
> All that's been said so far is that some people do not like the use of some 
> military terms, no matter where they come from and whether people know what 
> these mean or not. We are not on a crusade, and this is not about conquering 
> anything or anybody.

I am sorry, Joachim, but that is not true: he just said (ok, implicitly) that 
ESUG is worthless. And he said many more quite hurtful things by stating 
'facts' or comparing (as equal or unequal) or rating different projects.

Yes, since he wrote his first 'essay', it seems that he knows more or less what 
Smalltalk is, further than that I am sceptical.

Re: [Pharo-users] Blitzkrieg!

2015-01-18 Thread jtuchel
Horrido,


You are aware that there are regions on this planet where mails containing 
vocabulary like Blitzkrieg or Genaralissimo will evoke reactions that will not 
help at ll. You are at risk to simply be ignored in the best case. In the worst 
case, people will hsake their heads and associate Smalltalk with a certain kind 
of political spam they receive from time to time.


Joachim








Von: horrido
Gesendet: ‎Samstag‎, ‎17‎. ‎Januar‎ ‎2015 ‎16‎:‎15
An: Any question about pharo is welcome





http://horridohobbies.tumblr.com/   

*Today is the one-month anniversary of the SRP.* We have made good progress,
but there is still much work ahead of us.

Shortly, I will be seeking corporate sponsorship. As well, I'm trying to
coordinate activities with the Smalltalk Foundation.

Later this summer, I will be pushing my "Small Minds Initiative," a
sub-campaign of the SRP to get Smalltalk into the classroom. I will begin
with the Toronto District School Board.

Are we pumped yet?!

Generalissimo



--
View this message in context: http://forum.world.st/Blitzkrieg-tp4800165.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.