Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #9300

Re: .paid field vs .payment field

From Victor Porton <porton@narod.ru>
Newsgroups comp.programming
Subject Re: .paid field vs .payment field
Date 2018-09-25 18:59 +0300
Organization Aioe.org NNTP Server
Message-ID <podm0b$puj$1@gioia.aioe.org> (permalink)
References <po0slo$eqg$1@gioia.aioe.org> <03ff8449-f4f8-4c03-84d0-ab5efd539efa@googlegroups.com> <pobjcp$1dhl$1@gioia.aioe.org> <a1a3fe24-76dc-4d8a-8295-685f44f03de4@googlegroups.com>

Show all headers | View raw


Julio Di Egidio wrote:

> On Monday, 24 September 2018 23:02:34 UTC+2, Victor Porton  wrote:
>> Julio Di Egidio wrote:
>> > On Thursday, 20 September 2018 21:33:18 UTC+2, Victor Porton  wrote:
>> > 
>> >> I am writing a class SimpleItem representing a non-recurrent
>> >> (one-time) purchase.
>> > 
>> > Call it SimplePurchase then, and have it "contain" a SimpleItem as well
>> > as a SimplePayment (there's hardly any reason not to abstract the two
>> > apart), as well as, maybe, a SimpleRefund... i.e. depending on your
>> > business-level, aka explicit, *requirements*.
>> 
>> No, SimpleItem already has foreign key to SimplePayment.
> 
> That is still total nonsense: even if you collapse the notions of purchase
> and item, it's the item (purchase) that may have a payment, not the other
> way round.

No, there are links in BOTH directions:

Several SimplePayment objects may link to one SimpleItem (many-to-one).

But SimpleItem may link to one (or zero) unique SimplePayment (name it X). 
The back link from this SimplePayment is to this SimpleItem, but that X is a 
"special" payment, the one payment which was the last successful payment of 
this item.

So, you misunderstood me because you didn't know what there are links in 
both directions.

>> There is no need for SimplePurchase to link to SimplePayment too.

See above.

> Indeed, that would make even less sense.
> 
> And if that's beyond your understanding, get a job in agriculture.

You can read my abstract Nobel-level (yes, I know no Nobel in math) math 
research at:
http://www.mathematics21.org/algebraic-general-topology.html

It is not agriculture.

> *Plonk*
> 
> Julio
-- 
Victor Porton - http://portonvictor.org

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

.paid field vs .payment field Victor Porton <porton@narod.ru> - 2018-09-20 22:33 +0300
  Re: .paid field vs .payment field Victor Porton <porton@narod.ru> - 2018-09-22 16:40 +0300
  Re: .paid field vs .payment field Julio Di Egidio <julio@diegidio.name> - 2018-09-22 07:11 -0700
    Re: .paid field vs .payment field Victor Porton <porton@narod.ru> - 2018-09-22 17:17 +0300
      Re: .paid field vs .payment field Julio Di Egidio <julio@diegidio.name> - 2018-09-25 01:21 -0700
        Re: .paid field vs .payment field Victor Porton <porton@narod.ru> - 2018-09-25 18:59 +0300
          Re: .paid field vs .payment field Julio Di Egidio <julio@diegidio.name> - 2018-09-25 09:43 -0700
  Re: .paid field vs .payment field Julio Di Egidio <julio@diegidio.name> - 2018-09-22 08:53 -0700

csiph-web