[v14] PKs in New Tables - Bug or feature??

Keisuke Miyako (3/23/14 7:44AM)
Keisuke Miyako (3/23/14 1:46PM)
J?rg Knebel (3/23/14 3:17PM)
J?rg Knebel (3/23/14 9:14PM)
Joshua Fletcher (3/25/14 6:03PM)
Chuck Miller (3/26/14 12:31PM)
J?rg Knebel (3/26/14 3:30PM)
Joshua Fletcher (3/27/14 6:09PM)
David Adams (3/28/14 12:06PM)


Keisuke Miyako (3/23/14 7:44 AM)

Hello,

it (type and name) depends on your preferences/structure settings.

miyako

On 2014/03/23 13:17, "J?=83¬=B6rg Knebel"
<jknebel@...
wrote:

color><param>00000,0000,DDEE/param>DDid someone else tried to change
the type of that automatically created
PK-field to type-UUID directly?
/color>

Keisuke Miyako (3/23/14 1:46 PM)

something like:

1. uncheck database settings/integrate latest log if data file is
incomplete.
2. select table, right click, delete primary key.
3. select field, change type to string/UUID/auto.
4. goto MSC/compress/advanced/force update records.
5. restart. select ?=A2?=82¨=C5&igrave;create new log file?=A2?=82¨
¬=9D when prompted.
6. create primary key.
7. check database settings/integrate latest log if data file is
incomplete.

what I find perplexing is that if I use ?=A2?=82¨=C5&igrave;update by
formula (Generate
UUID)?=A2?=82¨=C2&ugrave; in step 4.
I can?=A2?=82¨=E2&Ntilde;¢t later set the field as primary key
(duplicate error)

miyako

On 2014/03/23 19:14, "J?=83¬=B6rg Knebel"
<jknebel@...
wrote:

color><param>00000,0000,DDEE/param>TThe question was: "How do I change
it after the field was created?" :o)
/color>

J?rg Knebel (3/23/14 3:17 PM)

Hi,

Is it just me or is there someone who can confirm this.

Environment: Mac X.8.5, 4D 14.1

Adding a new Table in a v14 database creates the table with a ID-field
of type LongInt Primary Key.

According to that webinar

<<https://www.youtube.com/watch?v=cquRjXBl1xE&list=UUGInXMk9DNWgkB3mJO
96Wrw>
a PK can be of type LongInt or UUID and a PK is mandatory for every
table.

Did someone else tried to change the type of that automatically
created PK-field to type-UUID directly?

Have fun! :o))))

Regards
J?=B6rg Knebel, M.Eng. - 4D Developer since 1991
TTT Data Systems Pty Ltd
Phone: +61 (0)2 6334 4730
www.tttdatasystems.com.au

J?rg Knebel (3/23/14 9:14 PM)

On 23/03/2014, at 17:44 AEDT, Keisuke Miyako <Keisuke.Miyako@...
wrote:

color><param>00000,0000,DDEE/param>iit (type and name) depends on your
preferences/structure settings.
/color>
Thanks Miyako, but I knew that.

The question was: "How do I change it after the field was created?" :o)

Regards
J?=B6rg Knebel, M.Eng. - 4D Developer since 1991
TTT Data Systems Pty Ltd
Phone: +61 (0)2 6334 4730
www.tttdatasystems.com.au

Joshua Fletcher (3/25/14 6:03 PM)

For a brand new table with no data?

-select table, right-click, delete primary key.
-select field, change type to string/UUID/auto.
-select field, right-click, create primary key.
-enable "include in log" file for the table (first step will disable
it).

Note: PK's are not *required*. You can have a table without a PK, but
you
therefore cannot journal it.

The explanation that Miyako posted applies to tables with existing data
IMO; the risk is certainly higher there.

-Josh

--
Josh Fletcher
Technical Account Manager
4D, Inc.

On 3/23/14, 3:14 AM, "J^rg Knebel" <jknebel@...
wrote:

color><param>00000,0000,DDEE/param>TThe question was: "How do I change
it after the field was created?" :o)
/color>

Chuck Miller (3/26/14 12:31 PM)

Wait a minute taken out of context that means that there are no
journal entries for these records. I get that you can not use journal
to recover version of db

If what you are saying is true, I do not recall ever seeing this in
any dbs journaling

Regards
Chuck
On Mar 26, 2014, at 12:30 AM, J^rg Knebel wrote:

color><param>8826F,0000,8219/param>NNote: PK's are not *required*. You
can have a table without a PK, but you
therefore cannot journal it.
/color>

--------------------------------------------------------------------------
----------------------
Chuck Miller Voice: (617) 739-0306
Informed Solutions, Inc. Fax: (617) 232-1064 ?=A0?=A0?=A0
PO Box 1720 mailto:cjmiller<AT SIGN>iinformed-solutions.com
Brookline, MA 02446 USA Registered 4D Developer ?=A0?=A0?=A0?=A0?
?=A0?=A0?=A0
?=A0?=A0?=A0Providers of 4D and Sybase connectivity
?=A0?=A0?=A0?=A0?http://www.informed-solutions.com ?

--------------------------------------------------------------------------
----------------------
This message and any attached documents contain information which may
be confidential, subject to privilege or exempt from disclosure under
applicable law. ?These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution,
disclosure, printing, copying, storage, modification or the taking of
any action in reliance upon this transmission is strictly prohibited.
?Delivery of this message to any person other than the intended
recipient shall not compromise or waive such confidentiality,
privilege or exemption from disclosure as to this communication.

J?rg Knebel (3/26/14 3:30 PM)

Josh,

Thanks for responding.

On 26/03/2014, at 04:03 AEDT, Joshua Fletcher <JFletcher@...
wrote:

color><param>00000,0000,DDEE/param>NNote: PK's are not *required*. You
can have a table without a PK, but you
therefore cannot journal it.
/color>
Just what I want thanks - I'll whinge again if it doesn't work as
expected of course.

Regards
J?=B6rg Knebel, M.Eng. - 4D Developer since 1991
TTT Data Systems Pty Ltd
Phone: +61 (0)2 6334 4730
www.tttdatasystems.com.au

Joshua Fletcher (3/27/14 6:09 PM)

Yes, that's also true because it's not possible to enable journaling
for a table unless it has a primary key.

I.e. a primary key is required for journaling in 4D v14.

-Josh

--
Josh Fletcher
Technical Account Manager
4D, Inc

color><param>00000,0000,DDEE/param>
/color>

-----Original Message-----
color><param>00000,0000,DDEE/param>II thought what you were stating
was that tables
with no primary key were not added to journal.
/color>

David Adams (3/28/14 12:06 PM)

<CAPXPcQtZ6OXW4pPBcSg54ZcH6rNxBC8RTEWM+34sRffaC160cg@...

color><param>00000,0000,DDEE/param>TThis setting toggles the ability
to access the table from Wakanda as a
/color>ddataclass.

I haven't looked at this at all, but if it's going over HTTP then
you're
exposing the table to anything that sends in a message formatted like a
request from Wakanda, I'd assume. Sounds like I should download the
Webcast
next week! (I still have to review the journaling one.) It's great
that you
guys are preparing these presentations and putting them on YouTube for
review.

<anecdote>
I like to download them as playback at 1:1 speed is pretty hard to stay
attentive to. Back in the 70's, my mom worked at a company called
Lexicon
that made digital-effects gear for studio racks. They sold one box
that did
nothing but pitch-shift recordings. So, you could take a 1x recording
and
play it back at say .5 speed or 1.5 speed without it sounding either
waaaaaay-toooo-slow or like a chipmunk. They tried out letting people
play
back recordings of speech and gave them a dial with no label. People
picked
about 1.25-1.5 as "normal", if I remember right. (I tired it too and
that's
how it worked out.) Listening to recordings just isn't stimulating
enough
to keep you engaged the way a real-life presentation might be. So, you
can
listen more attentively and absorb more if you can speed up playback.
I use
VLC at about 1.25x and it works just fine. Someone that speaks English
as a
second (third, etc.) language might want to slow the recording down,
for
all I know. If you use the (wonderful) VLC, look at the "Playback"
menu for
the speed slider.
</anecdote>

Reply to this message

Summary created 3/28/14 at 11:34AM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com