• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]


  • Subject: Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
  • From: Paul Hoadley <email@hidden>
  • Date: Thu, 04 Oct 2012 08:33:28 +0930

On 04/10/2012, at 8:25 AM, Chuck Hill wrote:

I would NOT be in favour using the PK as in invoice number.  That IS offensive!  :-P

Heh.  I guess it depends on your requirements for an invoice number.

I just object to the use of the PK for a piece of data that has meaning to the user.  Sooner or later they want to edit it or control it.  "I want them to start with 2013 next year"

Yeah, OK.  I'll be able to maintain control of the system I'm working on here, and the answer to that would be "No."  But point taken.

So, what's your beef with sparse sequences for invoice numbers (some local tax/legal issue?), and just out of interest, how would you solve the problem then?

I have run into that requirement before.  IIRC from someone who was used to a paper system were every invoice was kept, voided or not.

Fair enough—we're talking about different requirements.  What I need here is just an immutable, system-generated serial number.  In any case, I ended up using ERXSequence.NativeDatabaseSequence on top of a PostgreSQL sequence.  So no PKs were harmed.  :-)

It is a tricky thing to solve with EOF.  An ON INSERT trigger would be one way.

Ah yes, I remember you proposing that in a past thread on the topic.


-- 
Paul Hoadley
http://logicsquad.net/



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Paul Hoadley <email@hidden>)
 >Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Johann Werner <email@hidden>)
 >Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Paul Hoadley <email@hidden>)
 >Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Chuck Hill <email@hidden>)
 >Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Paul Hoadley <email@hidden>)
 >Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Chuck Hill <email@hidden>)
 >Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Paul Hoadley <email@hidden>)
 >Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder] (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
  • Next by Date: WOLips install
  • Previous by thread: Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
  • Next by thread: WOLips install
  • Index(es):
    • Date
    • Thread