Re: exposing the primary key?

2014-02-28 Thread Chuck Hill


On 2014-02-28, 2:18 PM, "Ramsey Gurley" wrote:

EOF can handle it. Sure. But users can’t handle the Primary Key! [Jack 
Nicholson face] Expose it, and they’ll want to change it. Guaranteed.

That depends on how you use it.

Besides, just displaying it is no reason to expose it. You can display it just 
by using ERXGenericRecord’s primaryKey() method. You can fetch by PK too, 
ERXEOControlUtilites.objectWithPrimaryKeyValue or 
ERXEOGlobalIDUtils.fetchObjectsWithGlobalIDs. Plus, once you expose it, you 
have to populate it yourself. That is a headache all on its own.

No, you don’t have to populate it yourself.  EOF will still do it as long as 
you leave it null.

Chuck



On Feb 28, 2014, at 2:48 PM, Chuck Hill 
mailto:ch...@global-village.net>> wrote:

Actually, exposing the PK is fine with EOF.  Exposing an FK is what causes real 
problems.


On 2014-02-28, 1:47 PM, "Aaron Rosenzweig" wrote:

Hi Ted,

If you must expose the primary key… make a duplicate attribute with a Read 
format and make it read only.

Look at page 41 of this document:
https://developer.apple.com/legacy/library/documentation/WebObjects/UsingEOModeler/UsingEOModeler.pdf

Exposing the PK as a class property could mess with the way EOF assigns the PK 
and it opens it up to possibly being modified.
Aaron Rosenzweig / Chat 'n Bike
e:  aa...@chatnbike.com  t:  (301) 956-2319
[Chat 'n Bike]  [Chat 'n Bike]

On Feb 28, 2014, at 4:41 PM, Jesse Tayler 
mailto:jtay...@oeinc.com>> wrote:

generate a unique ID, if you don’t mind using HEX….




On Feb 28, 2014, at 4:32 PM, Chuck Hill 
mailto:ch...@global-village.net>> wrote:

Does it mean anything to the user?  I assume it does, otherwise, why would you 
show it?  So what is going to happen when they see this:
id numberdescription client
 3456 Blue Dress Amex
 3457 Blue Socks Chuck
 3459 Blue Tie Ted
 3460 Blue Blouse Visa

Where is 3458?  Because that IS going to happen if you use the PK.

Chuck


On 2014-02-28, 1:25 PM, "Theodore Petrosky" wrote:

I need to create an Entity that will have a user visible id number. I thought I 
would just use the primaryKey but I recall reading so many times don't use the 
primaryKey for this.

This is a very simple Entity. It has a description, a Client, and a boolean 
(isActive). When the user views a list of these Entities, he/she will see:

id numberdescription client
 3456 Blue Dress Amex

when I insert a new Entity, I only need to supply the description and Client 
(from a popup). WO will supply the ID number. So why not use the primaryKey 
here? The user can never edit it. and none of these Entities will ever be 
deleted.
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com

This email sent to jtay...@oeinc.com

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com

This email sent to aa...@chatnbike.com

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com

This email sent to rgur...@smarthealth.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: exposing the primary key?

2014-02-28 Thread Klaus I. Berkling

On Feb 28, 2014, at 2:02 PM, Theodore Petrosky  wrote:

>> id numberdescription client
>>  4000 Blue Dress Amex
>>  3857 Blue Socks Chuck
>>  3459 Blue Tie Ted
>>  3460 Blue Blouse Visa
> 
> because the other numbers were made inActive (isActive = false).
> 


I don't think that was what Chuck necessarily thinking.  Someone will guess 
some other PK - opening the door to data/records leaking.
What is the key used for outside of your app? Will the key be part of a URL 
which may get bookmarked, or used externally like a SKU or purchase order 
number?


kib

"We keep moving forward, opening new doors, and doing new things, because we're 
curious and curiosity keeps leading us down new paths."
Walt Disney

Klaus Berkling
www.berkling.us | @kiberkli | Buy My iPhone app 







kib

"Some people never see the light, Till it shines through bullet holes" 
Tropic Moon, Burce Cockburn

Klaus Berkling
www.berkling.us | @kiberkli | Buy My iPhone app 





smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: exposing the primary key?

2014-02-28 Thread Ramsey Gurley
EOF can handle it. Sure. But users can’t handle the Primary Key! [Jack 
Nicholson face] Expose it, and they’ll want to change it. Guaranteed.

Besides, just displaying it is no reason to expose it. You can display it just 
by using ERXGenericRecord’s primaryKey() method. You can fetch by PK too, 
ERXEOControlUtilites.objectWithPrimaryKeyValue or 
ERXEOGlobalIDUtils.fetchObjectsWithGlobalIDs. Plus, once you expose it, you 
have to populate it yourself. That is a headache all on its own.


On Feb 28, 2014, at 2:48 PM, Chuck Hill  wrote:

> Actually, exposing the PK is fine with EOF.  Exposing an FK is what causes 
> real problems.
> 
> 
> On 2014-02-28, 1:47 PM, "Aaron Rosenzweig" wrote:
> 
> Hi Ted,
> 
> If you must expose the primary key… make a duplicate attribute with a Read 
> format and make it read only.
> 
> Look at page 41 of this document:
> https://developer.apple.com/legacy/library/documentation/WebObjects/UsingEOModeler/UsingEOModeler.pdf
> 
> Exposing the PK as a class property could mess with the way EOF assigns the 
> PK and it opens it up to possibly being modified.
> AARON ROSENZWEIG / Chat 'n Bike
> e:  aa...@chatnbike.com  t:  (301) 956-2319 
>   
> On Feb 28, 2014, at 4:41 PM, Jesse Tayler  wrote:
> 
>> generate a unique ID, if you don’t mind using HEX….
>> 
>> 
>> 
>> 
>> On Feb 28, 2014, at 4:32 PM, Chuck Hill  wrote:
>> 
>>> Does it mean anything to the user?  I assume it does, otherwise, why would 
>>> you show it?  So what is going to happen when they see this:
>>> id numberdescription client
>>>  3456 Blue Dress Amex
>>>  3457 Blue Socks Chuck
>>>  3459 Blue Tie Ted
>>>  3460 Blue Blouse Visa
>>> 
>>> Where is 3458?  Because that IS going to happen if you use the PK.
>>> 
>>> Chuck
>>> 
>>> 
>>> On 2014-02-28, 1:25 PM, "Theodore Petrosky" wrote:
>>> 
>>> I need to create an Entity that will have a user visible id number. I 
>>> thought I would just use the primaryKey but I recall reading so many times 
>>> don't use the primaryKey for this.
>>> 
>>> This is a very simple Entity. It has a description, a Client, and a boolean 
>>> (isActive). When the user views a list of these Entities, he/she will see:
>>> 
>>> id numberdescription client
>>>  3456 Blue Dress Amex
>>> 
>>> when I insert a new Entity, I only need to supply the description and 
>>> Client (from a popup). WO will supply the ID number. So why not use the 
>>> primaryKey here? The user can never edit it. and none of these Entities 
>>> will ever be deleted.
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>>> 
>>> This email sent to ch...@global-village.net
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
>>> 
>>> This email sent to jtay...@oeinc.com
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com
>> 
>> This email sent to aa...@chatnbike.com
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
> 
> This email sent to rgur...@smarthealth.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: exposing the primary key?

2014-02-28 Thread Theodore Petrosky
in this case it means nothing to skip a number. after some time they will see:

> id numberdescription client
>  4000 Blue Dress Amex
>  3857 Blue Socks Chuck
>  3459 Blue Tie Ted
>  3460 Blue Blouse Visa

because the other numbers were made inActive (isActive = false).



On Feb 28, 2014, at 4:32 PM, Chuck Hill  wrote:

> Does it mean anything to the user?  I assume it does, otherwise, why would 
> you show it?  So what is going to happen when they see this:
> id numberdescription client
>  3456 Blue Dress Amex
>  3457 Blue Socks Chuck
>  3459 Blue Tie Ted
>  3460 Blue Blouse Visa
> 
> Where is 3458?  Because that IS going to happen if you use the PK.
> 
> Chuck
> 
> 
> On 2014-02-28, 1:25 PM, "Theodore Petrosky" wrote:
> 
> I need to create an Entity that will have a user visible id number. I thought 
> I would just use the primaryKey but I recall reading so many times don't use 
> the primaryKey for this.
> 
> This is a very simple Entity. It has a description, a Client, and a boolean 
> (isActive). When the user views a list of these Entities, he/she will see:
> 
> id numberdescription client
>  3456 Blue Dress Amex
> 
> when I insert a new Entity, I only need to supply the description and Client 
> (from a popup). WO will supply the ID number. So why not use the primaryKey 
> here? The user can never edit it. and none of these Entities will ever be 
> deleted.
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to ch...@global-village.net

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: exposing the primary key?

2014-02-28 Thread Chuck Hill
Actually, exposing the PK is fine with EOF.  Exposing an FK is what causes real 
problems.


On 2014-02-28, 1:47 PM, "Aaron Rosenzweig" wrote:

Hi Ted,

If you must expose the primary key… make a duplicate attribute with a Read 
format and make it read only.

Look at page 41 of this document:
https://developer.apple.com/legacy/library/documentation/WebObjects/UsingEOModeler/UsingEOModeler.pdf

Exposing the PK as a class property could mess with the way EOF assigns the PK 
and it opens it up to possibly being modified.
Aaron Rosenzweig / Chat 'n Bike
e:  aa...@chatnbike.com  t:  (301) 956-2319
[Chat 'n Bike]  [Chat 'n Bike]

On Feb 28, 2014, at 4:41 PM, Jesse Tayler 
mailto:jtay...@oeinc.com>> wrote:

generate a unique ID, if you don’t mind using HEX….




On Feb 28, 2014, at 4:32 PM, Chuck Hill 
mailto:ch...@global-village.net>> wrote:

Does it mean anything to the user?  I assume it does, otherwise, why would you 
show it?  So what is going to happen when they see this:
id numberdescription client
 3456 Blue Dress Amex
 3457 Blue Socks Chuck
 3459 Blue Tie Ted
 3460 Blue Blouse Visa

Where is 3458?  Because that IS going to happen if you use the PK.

Chuck


On 2014-02-28, 1:25 PM, "Theodore Petrosky" wrote:

I need to create an Entity that will have a user visible id number. I thought I 
would just use the primaryKey but I recall reading so many times don't use the 
primaryKey for this.

This is a very simple Entity. It has a description, a Client, and a boolean 
(isActive). When the user views a list of these Entities, he/she will see:

id numberdescription client
 3456 Blue Dress Amex

when I insert a new Entity, I only need to supply the description and Client 
(from a popup). WO will supply the ID number. So why not use the primaryKey 
here? The user can never edit it. and none of these Entities will ever be 
deleted.
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com

This email sent to jtay...@oeinc.com

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com

This email sent to aa...@chatnbike.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: exposing the primary key?

2014-02-28 Thread Aaron Rosenzweig
Hi Ted,

If you must expose the primary key… make a duplicate attribute with a Read 
format and make it read only.

Look at page 41 of this document:
https://developer.apple.com/legacy/library/documentation/WebObjects/UsingEOModeler/UsingEOModeler.pdf

Exposing the PK as a class property could mess with the way EOF assigns the PK 
and it opens it up to possibly being modified.
AARON ROSENZWEIG / Chat 'n Bike
e:  aa...@chatnbike.com  t:  (301) 956-2319 


On Feb 28, 2014, at 4:41 PM, Jesse Tayler  wrote:

> generate a unique ID, if you don’t mind using HEX….
> 
> 
> 
> 
> On Feb 28, 2014, at 4:32 PM, Chuck Hill  wrote:
> 
>> Does it mean anything to the user?  I assume it does, otherwise, why would 
>> you show it?  So what is going to happen when they see this:
>> id numberdescription client
>>  3456 Blue Dress Amex
>>  3457 Blue Socks Chuck
>>  3459 Blue Tie Ted
>>  3460 Blue Blouse Visa
>> 
>> Where is 3458?  Because that IS going to happen if you use the PK.
>> 
>> Chuck
>> 
>> 
>> On 2014-02-28, 1:25 PM, "Theodore Petrosky" wrote:
>> 
>> I need to create an Entity that will have a user visible id number. I 
>> thought I would just use the primaryKey but I recall reading so many times 
>> don't use the primaryKey for this.
>> 
>> This is a very simple Entity. It has a description, a Client, and a boolean 
>> (isActive). When the user views a list of these Entities, he/she will see:
>> 
>> id numberdescription client
>>  3456 Blue Dress Amex
>> 
>> when I insert a new Entity, I only need to supply the description and Client 
>> (from a popup). WO will supply the ID number. So why not use the primaryKey 
>> here? The user can never edit it. and none of these Entities will ever be 
>> deleted.
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>> 
>> This email sent to ch...@global-village.net
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
>> 
>> This email sent to jtay...@oeinc.com
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com
> 
> This email sent to aa...@chatnbike.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: exposing the primary key?

2014-02-28 Thread Jesse Tayler
generate a unique ID, if you don’t mind using HEX….




On Feb 28, 2014, at 4:32 PM, Chuck Hill  wrote:

> Does it mean anything to the user?  I assume it does, otherwise, why would 
> you show it?  So what is going to happen when they see this:
> id numberdescription client
>  3456 Blue Dress Amex
>  3457 Blue Socks Chuck
>  3459 Blue Tie Ted
>  3460 Blue Blouse Visa
> 
> Where is 3458?  Because that IS going to happen if you use the PK.
> 
> Chuck
> 
> 
> On 2014-02-28, 1:25 PM, "Theodore Petrosky" wrote:
> 
> I need to create an Entity that will have a user visible id number. I thought 
> I would just use the primaryKey but I recall reading so many times don't use 
> the primaryKey for this.
> 
> This is a very simple Entity. It has a description, a Client, and a boolean 
> (isActive). When the user views a list of these Entities, he/she will see:
> 
> id numberdescription client
>  3456 Blue Dress Amex
> 
> when I insert a new Entity, I only need to supply the description and Client 
> (from a popup). WO will supply the ID number. So why not use the primaryKey 
> here? The user can never edit it. and none of these Entities will ever be 
> deleted.
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to ch...@global-village.net
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
> 
> This email sent to jtay...@oeinc.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: exposing the primary key?

2014-02-28 Thread Chuck Hill
Does it mean anything to the user?  I assume it does, otherwise, why would you 
show it?  So what is going to happen when they see this:
id numberdescription client
 3456 Blue Dress Amex
 3457 Blue Socks Chuck
 3459 Blue Tie Ted
 3460 Blue Blouse Visa

Where is 3458?  Because that IS going to happen if you use the PK.

Chuck


On 2014-02-28, 1:25 PM, "Theodore Petrosky" wrote:

I need to create an Entity that will have a user visible id number. I thought I 
would just use the primaryKey but I recall reading so many times don't use the 
primaryKey for this.

This is a very simple Entity. It has a description, a Client, and a boolean 
(isActive). When the user views a list of these Entities, he/she will see:

id numberdescription client
 3456 Blue Dress Amex

when I insert a new Entity, I only need to supply the description and Client 
(from a popup). WO will supply the ID number. So why not use the primaryKey 
here? The user can never edit it. and none of these Entities will ever be 
deleted.
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

exposing the primary key?

2014-02-28 Thread Theodore Petrosky
I need to create an Entity that will have a user visible id number. I thought I 
would just use the primaryKey but I recall reading so many times don't use the 
primaryKey for this.

This is a very simple Entity. It has a description, a Client, and a boolean 
(isActive). When the user views a list of these Entities, he/she will see:

id numberdescription client
 3456 Blue Dress Amex

when I insert a new Entity, I only need to supply the description and Client 
(from a popup). WO will supply the ID number. So why not use the primaryKey 
here? The user can never edit it. and none of these Entities will ever be 
deleted.
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unique Constraint Error

2014-02-28 Thread Calven Eggert
FYI, the problem has been solved (on initial testing) by checking the 
"Propagates Primary Key" checkbox for the relationship between table A & B.  
The ID is now using the proper sequence number.  The sequence number for table 
A is very close to the sequence number for table B.


On 2014-02-28, at 12:32 PM, Chuck Hill wrote:

> Jumping 40 from 37427 to 37467 is a little suspicious.  Is there an increment 
> > 1 on this sequence? It could be that EOF has a cached value out of sync 
> with the database.  
> 
> Or is the database sequence out of sync with the data in the table?  Try 
> re-creating the sequence.
> 
> Is anything else writing to this database besides EOF?
> 
> Chuck
> 
> 
> On 2014-02-28, 6:07 AM, "Calven Eggert" wrote:
> 
> I have a table A that has a one to many relationship to table B. (A->>B)  At 
> the time A is created a user may choose to create multiple B records before 
> they all get saved.
> 
> Problem is that the B records are causing a "unique constraint" error.  The 
> first sequence number is always an already chosen ID in the table.
> 
> Here is a snippet of the code generated:
> 
> SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL
> SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL
> 
> INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
> NOTES_USER_VISIBLE, NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, 
> NOTES_ID, NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, 
> ?)1:204(submittedby), 2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 
> 13:34:27(submitteddate), 5:"2"(notesdescription), 6:37427(notesid), 7:"eyetv 
> serial number.rtf"(attachmentname)>:
> INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
> NOTES_USER_VISIBLE, NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, 
> NOTES_ID, NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, 
> ?)1:204(submittedby), 2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 
> 13:34:27(submitteddate), 5:"2"(notesdescription), 6:37467(notesid), 7:"eyetv 
> serial number.rtf"(attachmentname)>:
> 
> Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
> constraint (CRE_MASTER.SYS_C001646) violated
> 
> The number 37467 is correct but the first number 37427 is not because it is 
> an already existing primary key. huh?
> 
> Anyone have any suggestions?  Why is the first number invalid and why is the 
> second one valid?
> 
> Calven
> 
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unique Constraint Error

2014-02-28 Thread Calven Eggert

On 2014-02-28, at 12:32 PM, Chuck Hill wrote:

> Jumping 40 from 37427 to 37467 is a little suspicious.  Is there an increment 
> > 1 on this sequence? It could be that EOF has a cached value out of sync 
> with the database.  

increment is 1.

> 
> Or is the database sequence out of sync with the data in the table?

how can this happen?  I started up the app from my machine and created the 
scenario in a very few steps.  

> Try re-creating the sequence.

I don't have access to production tables/sequences and so I wanted to see if 
there was something at my end that I could "fix" before speaking with the DBA.

> 
> Is anything else writing to this database besides EOF?

nope.

> 
> Chuck
> 
> 
> On 2014-02-28, 6:07 AM, "Calven Eggert" wrote:
> 
> I have a table A that has a one to many relationship to table B. (A->>B)  At 
> the time A is created a user may choose to create multiple B records before 
> they all get saved.
> 
> Problem is that the B records are causing a "unique constraint" error.  The 
> first sequence number is always an already chosen ID in the table.
> 
> Here is a snippet of the code generated:
> 
> SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL
> SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL
> 
> INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
> NOTES_USER_VISIBLE, NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, 
> NOTES_ID, NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, 
> ?)1:204(submittedby), 2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 
> 13:34:27(submitteddate), 5:"2"(notesdescription), 6:37427(notesid), 7:"eyetv 
> serial number.rtf"(attachmentname)>:
> INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, 
> NOTES_USER_VISIBLE, NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, 
> NOTES_ID, NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, 
> ?)1:204(submittedby), 2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 
> 13:34:27(submitteddate), 5:"2"(notesdescription), 6:37467(notesid), 7:"eyetv 
> serial number.rtf"(attachmentname)>:
> 
> Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
> constraint (CRE_MASTER.SYS_C001646) violated
> 
> The number 37467 is correct but the first number 37427 is not because it is 
> an already existing primary key. huh?
> 
> Anyone have any suggestions?  Why is the first number invalid and why is the 
> second one valid?
> 
> Calven
> 
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unique Constraint Error

2014-02-28 Thread Chuck Hill
Jumping 40 from 37427 to 37467 is a little suspicious.  Is there an increment > 
1 on this sequence? It could be that EOF has a cached value out of sync with 
the database.

Or is the database sequence out of sync with the data in the table?  Try 
re-creating the sequence.

Is anything else writing to this database besides EOF?

Chuck


On 2014-02-28, 6:07 AM, "Calven Eggert" wrote:

I have a table A that has a one to many relationship to table B. (A->>B)  At 
the time A is created a user may choose to create multiple B records before 
they all get saved.

Problem is that the B records are causing a "unique constraint" error.  The 
first sequence number is always an already chosen ID in the table.

Here is a snippet of the code generated:

SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL
SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL

INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?)1:204(submittedby), 
2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 13:34:27(submitteddate), 
5:"2"(notesdescription), 6:37427(notesid), 7:"eyetv serial 
number.rtf"(attachmentname)>:
INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?)1:204(submittedby), 
2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 13:34:27(submitteddate), 
5:"2"(notesdescription), 6:37467(notesid), 7:"eyetv serial 
number.rtf"(attachmentname)>:

Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
constraint (CRE_MASTER.SYS_C001646) violated

The number 37467 is correct but the first number 37427 is not because it is an 
already existing primary key. huh?

Anyone have any suggestions?  Why is the first number invalid and why is the 
second one valid?

Calven


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Unique Constraint Error

2014-02-28 Thread Calven Eggert
I have a table A that has a one to many relationship to table B. (A->>B)  At 
the time A is created a user may choose to create multiple B records before 
they all get saved.

Problem is that the B records are causing a "unique constraint" error.  The 
first sequence number is always an already chosen ID in the table.

Here is a snippet of the code generated:

SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL
SELECT JOBS_NOTES_SEQ.NEXTVAL FROM DUAL

INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?)1:204(submittedby), 
2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 13:34:27(submitteddate), 
5:"2"(notesdescription), 6:37427(notesid), 7:"eyetv serial 
number.rtf"(attachmentname)>:
INSERT INTO JOBS_NOTES(NOTES_SUBMITTED_BY, NOTES_HYPERLINK, NOTES_USER_VISIBLE, 
NOTES_JOB_ID, NOTES_SUBMITTED_DATE, NOTES_DESCRIPTION, NOTES_ID, 
NOTES_ATTACHMENT_NAME) VALUES (?, NULL, ?, ?, ?, ?, ?, ?)1:204(submittedby), 
2:"Y"(uservisible), 3:14456(jobid), 4:2014-02-27 13:34:27(submitteddate), 
5:"2"(notesdescription), 6:37467(notesid), 7:"eyetv serial 
number.rtf"(attachmentname)>:

Next exception:SQL State:23000 -- error code: 1 -- msg: ORA-1: unique 
constraint (CRE_MASTER.SYS_C001646) violated

The number 37467 is correct but the first number 37427 is not because it is an 
already existing primary key. huh?

Anyone have any suggestions?  Why is the first number invalid and why is the 
second one valid?

Calven


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Linking iOS and WebObjects

2014-02-28 Thread Pascal Robert
Just saw this on Twitter:

https://github.com/colemancda/NetworkObjects

> 
> FANTASTIC!
> 
> yes, ERSync is not going to work for the main question which is how to store 
> a local object graph that loads as the user sees things, and keep it updated 
> while still being able to rationally send data back to the server in a way 
> that can handle offline or poor network conditions etc.
> 
> ERRest is SUPER-FAB for being the server of an iPhone client and there’s 
> quite a few tricks we can and should compile together.
> 
> So, definitely call upon me to have something to say about all this and I’ve 
> been at it a few years now, so I have gone through all this at least once or 
> twice.
> 
> greatly looking forward!
> 
> jess
> 
> 
> 
> 
> On Feb 14, 2014, at 9:37 AM, Mark Wardle  wrote:
> 
>> Hi all,
>> 
>> I am starting to work on a new presentation layer for our web application 
>> using the iOS SDK. We plan on writing custom small iOS apps that integrate 
>> with the larger more complex backend web-application built in WebObjects. 
>> 
>> I can see ERSync but note it is not in Wonder yet. Is this still in 
>> development or is it ready for deployment? It certainly looks an easy way to 
>> get started.
>> 
>> However, we might want more finely grained control anyway. We’ve been adding 
>> REST interfaces to the backend. Does anyone have any recommendations for an 
>> iOS client library to make this work trivial? I would think that we could 
>> create some stub object-graph in objective c that then gets sent to the 
>> server semi-automatically? Is there something that would take an EOModel and 
>> create a core data equivalent or skeleton classes? 
>> 
>> I can see various references on the mailing list but nothing on the wiki. 
>> 
>> Any pointers (*) much appreciated!
>> 
>> Mark
>> (*) you can tell I’m back to coding in C and not just using java (!)
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
>> 
>> This email sent to jtay...@oeinc.com
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to prob...@macti.ca


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com