Re: Primary keys

2014-10-02 Thread Chuck Hill
On 2014-10-02, 10:45 AM, "Mark Wardle" wrote: Thanks Ted, that is interesting. Unfortunately, the existing primary key is used in joins from other tables so I think it will need to be a multi-step procedure. Take home message for me is never ever have primary keys with any kind o

Re: Primary keys

2014-10-02 Thread Mark Wardle
Thanks Ted, that is interesting. Unfortunately, the existing primary key is used in joins from other tables so I think it will need to be a multi-step procedure. Take home message for me is never ever have primary keys with any kind of meaning, even if coming from an external reputable third

Re: Primary keys

2014-10-02 Thread Theodore Petrosky
if there is already a primary key, then I think the correct thing to do is to drop the first and add what you want. I have no experience doing this, but it seems logical. ERXMigrationTable theTable = database.existingTableNamed(“yourTable”); theTable.dropPrimaryKey(columns); theTable.setPrimar

Re: Primary keys

2014-10-02 Thread Mark Wardle
Thanks Fabian. Can one use ERXMigration to add a serial column? I don’t think it is a JDBC column type? I can create an integer column and then add the serial default value in SQL presumably. I suspect there isn’t a database agnostic way to do this. I’ll try that. Thank you again, Mark > On

Re: Primary keys

2014-10-02 Thread Fabian Peters
Hi Mark, For postgresql you could add a column "serial". When the column is added, it is populated with values by postgres. You could then use migration's "setPrimaryKey" and "dropPrimaryKey". This is totally untested… Fabian Am 02.10.2014 um 11:00 schrieb Mark Wardle : > Dear all, > > I ne

Primary keys

2014-10-02 Thread Mark Wardle
Dear all, I need to add a new primary key to a table that already contains data. Is it possible to use migrations to add this and have the column auto-populated with a serial number? My other plan was to create an integer column and then, in code, iterate through the objects manually setting

Re: Problem with Primary Keys (I think)

2013-02-21 Thread Johnny Miller
>>> >>> On 2013-02-20, at 4:56 PM, Johnny Miller wrote: >>> >>>> Hi Ken, >>>> >>>> Sure - The XXXs represent information that I stripped for customer >>>> privacy. >>>> >>>> So the EO that is getting change

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Chuck Hill
> >>> So the EO that is getting changed exists in the DB and it is not created by >>> the app that is throwing the error. The DB is using sequences to track the >>> primary keys. I'm not doing anything other than using the defaults. The >>>

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Johnny Miller
ject that's being modified? >>>>> >>>>> On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: >>>>> >>>>>> Hi Ken, >>>>>> >>>>>> Sure - The XXXs represent information that I stripped for customer

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Chuck Hill
>> >>>> On Feb 20, 2013, at 5:56 PM, Johnny Miller wrote: >>>> >>>>> Hi Ken, >>>>> >>>>> Sure - The XXXs represent information that I stripped for customer >>>>> privacy. >>>>> >>>>>

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Johnny Miller
56 PM, Johnny Miller wrote: >>> >>>> Hi Ken, >>>> >>>> Sure - The XXXs represent information that I stripped for customer >>>> privacy. >>>> >>>> So the EO that is getting changed exists in the DB and it is not crea

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Chuck Hill
wrote: >> >>> Hi Ken, >>> >>> Sure - The XXXs represent information that I stripped for customer privacy. >>> >>> So the EO that is getting changed exists in the DB and it is not created by >>> the app that is throwing the error. The DB is

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Johnny Miller
gt; So the EO that is getting changed exists in the DB and it is not created by >> the app that is throwing the error. The DB is using sequences to track the >> primary keys. I'm not doing anything other than using the defaults. The >> error is it cannot set the hub_id

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Johnny Miller
stripped for customer privacy. >> >> So the EO that is getting changed exists in the DB and it is not created by >> the app that is throwing the error. The DB is using sequences to track the >> primary keys. I'm not doing anything other than using the default

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Johnny Miller
Miller wrote: > >> Hi Ken, >> >> Sure - The XXXs represent information that I stripped for customer privacy. >> >> So the EO that is getting changed exists in the DB and it is not created by >> the app that is throwing the error. The DB is using sequenc

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Chuck Hill
: > Hi Ken, > > Sure - The XXXs represent information that I stripped for customer privacy. > > So the EO that is getting changed exists in the DB and it is not created by > the app that is throwing the error. The DB is using sequences to track the > primary keys. I'

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Ken Anderson
reated by > the app that is throwing the error. The DB is using sequences to track the > primary keys. I'm not doing anything other than using the defaults. The > error is it cannot set the hub_id to null which should fail validation on > both the EO and the DB. Why it is t

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Johnny Miller
Hi Ken, Sure - The XXXs represent information that I stripped for customer privacy. So the EO that is getting changed exists in the DB and it is not created by the app that is throwing the error. The DB is using sequences to track the primary keys. I'm not doing anything other than

Re: Problem with Primary Keys (I think)

2013-02-20 Thread Ken Anderson
Johnny, Could you post the details of the exception? Also, how are you getting your primary keys? You really shouldn't have a problem assuming you're using a table for primary keys. Ken On Feb 20, 2013, at 5:43 PM, Johnny Miller wrote: > Hi, > > OK. This is a

Problem with Primary Keys (I think)

2013-02-20 Thread Johnny Miller
Hi, OK. This is a hard one to explain. Basically, I have a site that has a back and a front end. Separate apps running on the same host. I'm using ERJGroupsSynchronizer. The host is AWS with Amazon Linux AMI. The database is PostgreSQL 9.2. Both ends create objects. For some reason every

Re: Problem generating primary keys

2010-08-22 Thread Richard Palmer
you doing something special or out of the >>> ordinary? >>> >>> Dave >>> >>> >>> On Aug 22, 2010, at 3:31 AM, Richard Palmer wrote: >>> >>>> 'm confused :-( >>>> >>>> >>>> Primary

Re: Problem generating primary keys

2010-08-22 Thread Ken Anderson
Hi Richard, >> >> Why do you need the PK? Are you doing something special or out of the >> ordinary? >> >> Dave >> >> >> On Aug 22, 2010, at 3:31 AM, Richard Palmer wrote: >> >>> 'm confused :-( >>> >>> >

Re: Problem generating primary keys

2010-08-22 Thread Richard Palmer
most appreciated. Richard Palmer On Aug 22, 2010, at 10:50 AM, David Avendasora wrote: > Hi Richard, > > Why do you need the PK? Are you doing something special or out of the > ordinary? > > Dave > > > On Aug 22, 2010, at 3:31 AM, Richard Palmer wrote: > >>

Re: Problem generating primary keys

2010-08-22 Thread David Avendasora
Hi Richard, Why do you need the PK? Are you doing something special or out of the ordinary? Dave On Aug 22, 2010, at 3:31 AM, Richard Palmer wrote: > 'm confused :-( > > > Primary keys are generated by calling primaryKeysForNewRowsWithEntity(int > count,

Re: Problem generating primary keys

2010-08-22 Thread Mike Schrag
It's implemented in JDBCChannel (extends EOAdaptorChannel), which then delegates to your database plugin On Aug 22, 2010, at 3:31 AM, Richard Palmer wrote: > 'm confused :-( > > > Primary keys are generated by calling primaryKeysForNewRowsWithEntity(int > c

Problem generating primary keys

2010-08-22 Thread Richard Palmer
'm confused :-( Primary keys are generated by calling primaryKeysForNewRowsWithEntity(int count, EOEntity entity) on EOAdapterChannel. This method, in turn, calls primaryKeyForNewRowWithEntity(EOEntity entity) which is deprecated and simply returns null. These two methods are the sa

Re: Failed to provide primary keys?

2010-07-14 Thread Chuck Hill
try { >ec.saveChanges(); >} catch (EOGeneralAdaptorException e) { >throw new > RuntimeException(WKEOUtils.generalAdaptorExceptionInfo(e)); >} catch (IllegalStateException e) { > // This is to

Re: Failed to provide primary keys?

2010-07-14 Thread Kieran Kelleher
// This is to try and gather enough info to solve the PITA occasional "failed to provide primary keys" error String msg = ExceptionUtils.getRootCauseMessage(e); StringBuilder b = new StringBuilder();

Re: Failed to provide primary keys?

2010-07-13 Thread Chuck Hill
Suppression.txt. > Erroneous results for import are: isSuccess = false; > messages = null; > userInfo = null > java.lang.RuntimeException: Root Cause: IllegalStateException: Adaptor > er.extensions.jdbc.erxjdbcadap...@2ff88688 failed to provide new primary keys > for entity '

Re: Failed to provide primary keys?

2010-07-13 Thread Kieran Kelleher
rroneous results for >> import are: isSuccess = false; >> messages = null; >> userInfo = null >> java.lang.RuntimeException: Root Cause: IllegalStateException: Adaptor >> er.extensions.jdbc.erxjdbcadap...@2ff88688 failed to provide new primary >> keys for enti

Re: Failed to provide primary keys?

2010-07-13 Thread Farrukh Ijaz
...@2ff88688 failed to provide new primary keys > for entity 'CTDataRecord'; Currently 0 active ECs : {})No open editing > contexts (of 0)0 active ObjectStoreCoordinators : {})No open > ObjectStoreCoordinator (of 0) > at > wk.webobjects.eof.ImportEnterpriseObj

Failed to provide primary keys?

2010-07-13 Thread Kieran Kelleher
= null; userInfo = null java.lang.RuntimeException: Root Cause: IllegalStateException: Adaptor er.extensions.jdbc.erxjdbcadap...@2ff88688 failed to provide new primary keys for entity 'CTDataRecord'; Currently 0 active ECs : {})No open editing contexts (of 0)0 active ObjectStoreCo

Re: Failed to get Primary Keys

2010-03-24 Thread Kieran Kelleher
destination relationships to objects with multiple > pk's .. > > On Mar 24, 2010, at 12:41 PM, Kieran Kelleher wrote: > >> Occasionally I get this kind of error in production: >> >> Caused by: java.lang.IllegalStateException: Adaptor >> er.extensions.

Re: Failed to get Primary Keys

2010-03-24 Thread Mike Schrag
>> that has to do with owns destination relationships to objects with multiple >> pk's .. > I was thinking the same time: EOF tries to insert the row with propagated > keys before the related rows have generated their keys. too bad this bug hasn't been fixed. ms

Re: Failed to get Primary Keys

2010-03-24 Thread Chuck Hill
eption: Adaptor er.extensions.jdbc.erxjdbcadap...@5fd3f561 failed to provide new primary keys for entity 'CTDataRecord' at com .webobjects .eoaccess .EODatabaseContext .prepareForSaveWithCoordinator(EODatabaseContext.java:5885) at com .webobjects .eocontrol

Re: Failed to get Primary Keys

2010-03-24 Thread Mike Schrag
on: > > Caused by: java.lang.IllegalStateException: Adaptor > er.extensions.jdbc.erxjdbcadap...@5fd3f561 failed to provide new primary keys > for entity 'CTDataRecord' > at > com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoord

Failed to get Primary Keys

2010-03-24 Thread Kieran Kelleher
Occasionally I get this kind of error in production: Caused by: java.lang.IllegalStateException: Adaptor er.extensions.jdbc.erxjdbcadap...@5fd3f561 failed to provide new primary keys for entity 'CTDataRecord' at com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithC

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread Kieran Kelleher
he entity and package. > Basically I need to know the "order" of the objects in the table so I > ascribed a position value. > > After I create the object and attempt to save it I'm getting the error > "failed to provide new primary keys for entity". I've

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread Johan Henselmans
On 24 feb 2010, at 21:04, Johnny Miller wrote: > OK. There is officially a menehune living in my machine. > > Because all of a sudden it just works - with no changes on my part. I've > double/triple checked the plists nothing has changed. > I have had the same experience, but on a differen

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread David Avendasora
Your Welcome. :-P Dave On Feb 24, 2010, at 3:04 PM, Johnny Miller wrote: > OK. There is officially a menehune living in my machine. > > Because all of a sudden it just works - with no changes on my part. I've > double/triple checked the plists nothing has changed. > > I'm going to call my

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread Johnny Miller
OK. There is officially a menehune living in my machine. Because all of a sudden it just works - with no changes on my part. I've double/triple checked the plists nothing has changed. I'm going to call my local Catholic priest to resolve the issue. On Feb 24, 2010, at 9:08 AM, David Avendas

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread Johnny Miller
Sure. Thanks a lot David! see below... Lahaina:MAPModel.eomodeld jlmiller$ more MAP_ImageGallery.plist { attributes = ( { allowsNull = Y; columnName = "CREATE_DATE"; name = createDate; prototypeName = dateTime; },

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread David Avendasora
On Feb 24, 2010, at 2:02 PM, Chuck Hill wrote: > > On Feb 24, 2010, at 10:53 AM, Johnny Miller wrote: > >> Hi, >> >> I'm still stuck >:( >> >> I thought this information might be helpful. >> >> If I do a System.out on entity.primaryKeyAttributeNames() I see the right >> keys. >> >> If I S

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread Chuck Hill
need to know the "order" of the objects in the table so I ascribed a position value. After I create the object and attempt to save it I'm getting the error "failed to provide new primary keys for entity". I've checked the database and the table exists, the foreign

Re: "failed to provide new primary keys for entity"

2010-02-24 Thread Johnny Miller
t;>>> >>>>>> On Feb 23, 2010, at 10:49 AM, Don Lindsay wrote: >>>>>> >>>>>>> This sounds like you have a compound primary key? A primary key with >>>>>>> more than one field or that you

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Johnny Miller
the attributes these based on still not exposed (they should not be >>> exposed)? >> >> A < - >> AB << - > B >> >> I exposed ab.a and ab.b. The rest of the relationships are the way the >> wizard created it. > > Not relationship

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Chuck Hill
appropriate one for the entity and package. Basically I need to know the "order" of the objects in the table so I ascribed a position value. After I create the object and attempt to save it I'm getting the error "failed to provide new primary keys for entity".

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Johnny Miller
>>> number and use it. Not use other fields in the table, just create a >>>>> number field that is the primary key this will save you lots of hair >>>>> pulling. >>>>> >>>>> Don >>>>> On Feb 23, 2010, at 3:00 PM, Johnny

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Chuck Hill
t; of the objects in the table so I ascribed a position value. After I create the object and attempt to save it I'm getting the error "failed to provide new primary keys for entity". I've checked the database and the table exists, the foreign keys are created and I'v

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Johnny Miller
created >>>> using the new relationship wizard in Entity Modeler. >>>> >>>> I then added a class property to the intermediary table and changed the >>>> class name from EOGeneric record to an appropriate one for the entity and >>>> packag

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Kieran Kelleher
ble and changed the >>> class name from EOGeneric record to an appropriate one for the entity and >>> package. Basically I need to know the "order" of the objects in the table >>> so I ascribed a position value. >>> >>> After I create the obj

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Don Lindsay
m getting the error "failed to provide new primary keys for entity". I've checked the database and the table exists, the foreign keys are created and I've actually compared it to another table/model where I've done exactly the same thing without an issue. I'

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Johnny Miller
bed a position value. >> >> After I create the object and attempt to save it I'm getting the error >> "failed to provide new primary keys for entity". I've checked the database >> and the table exists, the foreign keys are created and I've ac

Re: "failed to provide new primary keys for entity"

2010-02-23 Thread Don Lindsay
nd attempt to save it I'm getting the error "failed to provide new primary keys for entity". I've checked the database and the table exists, the foreign keys are created and I've actually compared it to another table/model where I've done exactly the same thi

"failed to provide new primary keys for entity"

2010-02-23 Thread Johnny Miller
I need to know the "order" of the objects in the table so I ascribed a position value. After I create the object and attempt to save it I'm getting the error "failed to provide new primary keys for entity". I've checked the database and the table exists, the for

Re: Binary primary keys

2009-12-02 Thread Jerald Dawson
hu, 26 Nov 2009 10:48:37 -0800 >> From: Chuck Hill >> Subject: Re: Binary primary keys >> To: Jeff Dunnett >> Cc: webobjects-dev@lists.apple.com >> Message-ID: >> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes >> >> Using Won

Re: Binary primary keys

2009-12-02 Thread David Avendasora
On Dec 2, 2009, at 4:52 AM, Anjo Krank wrote: > But it has to fetch them first to check *their* delete rules, which to > prevent was the whole idea. Was it? I didn't get that from his question. Maybe I am wrong, it has happened before, but this whole exercise smelled of premature optimization.

Re: Binary primary keys

2009-12-02 Thread Anjo Krank
But it has to fetch them first to check *their* delete rules, which to prevent was the whole idea. But my question was why you put together SQL. Take a look at ERXEOAccessUtilities.deleteRowsDescribedByQualifier() to say how this is done right. And no matter how you look at it: manually put

Re: Binary primary keys

2009-12-01 Thread Cheong Hee Ng
Hi I think it will be easier to do it from Cascade Delete Rule (define at EOModeler). Such as: organization ->>departments ->> users ->> projects ->> projectStatuses... By deleting organization alone, all objects defined in the CasCade Delete Rule will just being deleted in single line: ec.delet

Re: Binary primary keys

2009-12-01 Thread Lon Varscsak
Plus it just makes WO more fun. -Lon On Tue, Dec 1, 2009 at 2:17 PM, Kieran Kelleher wrote: > Seriously, absolutely a necessity (unless you want to spend 1000's of > manhours reinventing it). To steal a phrase from the American Express card > adverts. "Never start a WebObjects app without it" >

Re: Binary primary keys

2009-12-01 Thread Kieran Kelleher
Seriously, absolutely a necessity (unless you want to spend 1000's of manhours reinventing it). To steal a phrase from the American Express card adverts. "Never start a WebObjects app without it" On Dec 1, 2009, at 10:42 AM, Jeff Dunnett wrote: No I am not using wonder but the more I work wi

Re: Binary primary keys

2009-12-01 Thread David Avendasora
On Dec 1, 2009, at 10:41 AM, Jeff Dunnett wrote: > > Anjo, > > Well the idea is to select a single primary key and then yes it to quickly > delete a large number of records from a table. > > Using SQL query like this: > > DELETE FROM "cms"."ms_contestant" WHERE contest_id = (SELECT contest

Re: Binary primary keys

2009-12-01 Thread Jeff Dunnett
Message: 9 Date: Thu, 26 Nov 2009 10:48:37 -0800 From: Chuck Hill Subject: Re: Binary primary keys To: Jeff Dunnett Cc: webobjects-dev@lists.apple.com Message-ID: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Using Wonder? ERXStringUtilities.byteArrayToHexString

Re: Binary primary keys

2009-12-01 Thread Jeff Dunnett
-- Message: 7 Date: Thu, 26 Nov 2009 18:32:52 +0100 From: Anjo Krank Subject: Re: Binary primary keys To: WebObjects-Dev Apple Message-ID: <5ecf6d17-d411-4ed1-8376-b98dc641c...@krank.net> Content-Type: text/plain; charset=us-ascii Am 26.11.2009 um 18:26 s

Re: Binary primary keys

2009-11-26 Thread Anjo Krank
As I was saying: UTF-8 has particular requirements to the character data. You can't simply put any old byte array in it. So even the first part wouldn't work. ISO-Latin, would, for that matter, because it's simply a map of 0-255->some chars. Cheers, Anjo Am 26.11.2009 um 19:05 schrieb Lachla

Re: Binary primary keys

2009-11-26 Thread Chuck Hill
, Jeff On 25-Nov-09, at 5:25 PM, Chuck Hill wrote: What does it look like? What is it supposed to look like? Chuck On Nov 25, 2009, at 1:27 PM, Jeff Dunnett wrote: Hello, All of the Entities in our model use primary keys that have an external data type of binary with a width of 24. I

Re: Binary primary keys

2009-11-26 Thread Lachlan Deck
On 27/11/2009, at 4:32 AM, Anjo Krank wrote: > Am 26.11.2009 um 18:26 schrieb Lachlan Deck: > >> String hexString = new String(nsdata.bytes(), "UTF-8"); > > This won't work. There are a lot of invalid UTF-8 combinations, so you will > get exceptions - if your DB accepts the syntax in the first

Re: Binary primary keys

2009-11-26 Thread Anjo Krank
Am 26.11.2009 um 18:26 schrieb Lachlan Deck: > String hexString = new String(nsdata.bytes(), "UTF-8"); This won't work. There are a lot of invalid UTF-8 combinations, so you will get exceptions - if your DB accepts the syntax in the first place. Use bind variables. And why are you using SQL and

Re: Binary primary keys

2009-11-26 Thread Lachlan Deck
M, Jeff Dunnett wrote: >> >>> Hi Chuck, >>> >>> Ops I knew I forgot to mention something. It is supposed to be in Hex >>> looking like 0x81618cb507d30200011696cb1cdd430dea9f. >>> >>> Regards, >>> Jeff >>>

Re: Binary primary keys

2009-11-26 Thread Jeff Dunnett
f Dunnett wrote: Hi Chuck, Ops I knew I forgot to mention something. It is supposed to be in Hex looking like 0x81618cb507d30200011696cb1cdd430dea9f. Regards, Jeff On 25-Nov-09, at 5:25 PM, Chuck Hill wrote: What does it look like? What is it supposed to look like? Chuck

Re: Binary primary keys

2009-11-26 Thread Mike Schrag
5-Nov-09, at 5:25 PM, Chuck Hill wrote: > >> What does it look like? What is it supposed to look like? >> >> >> Chuck >> >> >> On Nov 25, 2009, at 1:27 PM, Jeff Dunnett wrote: >> >>> Hello, >>> >>> All of the Entiti

Re: Binary primary keys

2009-11-26 Thread Jeff Dunnett
, at 1:27 PM, Jeff Dunnett wrote: Hello, All of the Entities in our model use primary keys that have an external data type of binary with a width of 24. I have to use some raw SQL to write some queries...One of those raw SQL queries fetches the primary key of a row. I then need to use that

Re: Binary primary keys

2009-11-25 Thread Chuck Hill
What does it look like? What is it supposed to look like? Chuck On Nov 25, 2009, at 1:27 PM, Jeff Dunnett wrote: Hello, All of the Entities in our model use primary keys that have an external data type of binary with a width of 24. I have to use some raw SQL to write some queries

Binary primary keys

2009-11-25 Thread Jeff Dunnett
Hello, All of the Entities in our model use primary keys that have an external data type of binary with a width of 24. I have to use some raw SQL to write some queries...One of those raw SQL queries fetches the primary key of a row. I then need to use that primary key to form the basis

Re: [SOLVED] Re: failed to provide new primary keys for entity

2009-07-24 Thread Miguel Angel Torres Avila
On Jul 24, 2009, at 1:23 AM, Cheong Hee (Gmail) wrote: Hope this information helps someone else that is new to Prototypes. Good that you mentioned it. I recalled going through the same path when trying with EOPrototypes , flip-flop with wonder and wo docs to get better picture. Suggest

Re: [SOLVED] Re: failed to provide new primary keys for entity

2009-07-23 Thread Cheong Hee (Gmail)
Hope this information helps someone else that is new to Prototypes. Good that you mentioned it. I recalled going through the same path when trying with EOPrototypes , flip-flop with wonder and wo docs to get better picture. Suggest to add this info into wiki if could. Since EOPrototypes is

failed to provide new primary keys for entity

2009-07-22 Thread Miguel Angel Torres Avila
Hi guys, I am trying to save an object into the database using PostgresqlPlugIn.framework provided by Wonder. I am getting this error: java.lang.IllegalStateException: Adaptor com.webobjects.jdbcadaptor.jdbcadap...@be9d36 failed to provide new primary keys for entity 'Parametros

Webobjects design: primary keys with business meaning and allowing users to type them in!

2009-03-24 Thread Mark Wardle
string postcode and string organisation id as primary keys. A user can complete an address for a patient, and types in the postcode. At the moment, I have a relationship defined with the text entered by the user as a foreign key acting as a lookup. I don't mind if the postcode doesn't e

Re: Problem getting primary keys

2009-02-03 Thread Miguel Arroz
Hi again! ... and replacing EOUtilites.rawRowsForSQL for ERXEOAccessUtilities.evaluateSQLWithEntityNamed (it works, as I don't care about the result) solves the problem. Issues between EOUtilities native code and ERXEC? Yours Miguel Arroz On 2009/02/03, at 17:54, Miguel Arroz wrote:

Problem getting primary keys

2009-02-03 Thread Miguel Arroz
Hi! I'm having the following problem when adding two objects to the database: Feb 03 17:48:27 (ERXDatabaseContextDelegate.java:160) INFO er.transaction.adaptor.Exceptions - Database Exception occured: java.lang.IllegalArgumentException: Array is empty Feb 03 17:48:27 (ERXNSLogLog4jBri

Re: Obtaining newly generated primary keys during save

2008-12-19 Thread Kieran Kelleher
their relationship fields are properly initialised during save with newly generated primary keys. P.S. I do not want to use actual relationships from that table storing pKeys as it is not in fact a part of business logic but something like log and it stores primary keys from different tables in the same

Obtaining newly generated primary keys during save

2008-12-19 Thread Gennady Kushnir
on on EOGlobalID.GlobalIDChangedNotification but it seemes too late as changes made at that moment were not saved. I think there should be some solution as if you save several recently created related objects their relationship fields are properly initialised during save with newly generated primary keys. P.S. I do not want t

Re: "failed to provide new primary keys" error

2008-12-03 Thread Pascal Robert
hen I try to save a newly created (and inserted object), I get : Adaptor [EMAIL PROTECTED] failed to provide new primary keys for entity 'Utilisateur' EO_PK_TABLE is there, so I don't know why I'm getting that :-/ The entity do have a single key primary key, of type

Re: "failed to provide new primary keys" error

2008-12-03 Thread Chuck Hill
erted object), I get : Adaptor [EMAIL PROTECTED] failed to provide new primary keys for entity 'Utilisateur' EO_PK_TABLE is there, so I don't know why I'm getting that :-/ The entity do have a single key primary key, of type Long (BIGINT in the BD). Just that one objec

Re: "failed to provide new primary keys" error

2008-12-03 Thread Pascal Robert
ailed to provide new primary keys for entity 'Utilisateur' EO_PK_TABLE is there, so I don't know why I'm getting that :-/ The entity do have a single key primary key, of type Long (BIGINT in the BD). Just that one object or any object? If just that one, check

Re: "failed to provide new primary keys" error

2008-12-02 Thread Chuck Hill
On Dec 2, 2008, at 1:45 PM, Pascal Robert wrote: I don't understand this one... WO 5.4.3, WOLips stable, MySQL 4.1 with JDBC connector 5.0.8. When I try to save a newly created (and inserted object), I get : Adaptor [EMAIL PROTECTED] failed to provide new primary keys for e

"failed to provide new primary keys" error

2008-12-02 Thread Pascal Robert
I don't understand this one... WO 5.4.3, WOLips stable, MySQL 4.1 with JDBC connector 5.0.8. When I try to save a newly created (and inserted object), I get : Adaptor [EMAIL PROTECTED] failed to provide new primary keys for entity 'Utilisateur' EO_PK_TABLE is there, so I

Re: failing to provide new primary keys

2008-11-18 Thread Mike Schrag
Doesn't everyone have inverse relationships on join entities? They're required for flattening, and sort of annoying if you're not flattening, Except when you can't flatten as you're needing to store additional info in the join. Yeah, that was part 2 above, but i wrote it unclearly ... I meant

Re: failing to provide new primary keys

2008-11-18 Thread Lachlan Deck
On 19/11/2008, at 10:09 AM, Mike Schrag wrote: I'm thinking though (in this age of optimisations) that this means you have to map the reverse relationship in order for the pk to propogate. Either way it seems to me that it'd make more sense if the option to propogate (or labelled 'propogate

Re: failing to provide new primary keys

2008-11-18 Thread Mike Schrag
I'm thinking though (in this age of optimisations) that this means you have to map the reverse relationship in order for the pk to propogate. Either way it seems to me that it'd make more sense if the option to propogate (or labelled 'propogated') was on the relationship from the join rathe

Re: failing to provide new primary keys

2008-11-18 Thread Lachlan Deck
On 19/11/2008, at 2:57 AM, Mike Schrag wrote: Propagate primary key turned on for all relationships where the FK is part of the PK? Is this a general check that can be performed? If your EO has a composite primary key then the inverse relationship of each PK join must be propagates primary

Re: failing to provide new primary keys

2008-11-18 Thread Mike Schrag
Propagate primary key turned on for all relationships where the FK is part of the PK? Is this a general check that can be performed? If your EO has a composite primary key then the inverse relationship of each PK join must be propagates primary key? I can't think of an exception to this wh

Re: failing to provide new primary keys

2008-11-18 Thread Chuck Hill
On Nov 18, 2008, at 4:22 AM, Mike Schrag wrote: Propagate primary key turned on for all relationships where the FK is part of the PK? Is this a general check that can be performed? If your EO has a composite primary key then the inverse relationship of each PK join must be propagates prim

Re: failing to provide new primary keys

2008-11-18 Thread Mike Schrag
Propagate primary key turned on for all relationships where the FK is part of the PK? Is this a general check that can be performed? If your EO has a composite primary key then the inverse relationship of each PK join must be propagates primary key? ms _

Re: failing to provide new primary keys

2008-11-17 Thread Lachlan Deck
On 18/11/2008, at 5:59 PM, Chuck Hill wrote: Propagate primary key turned on for all relationships where the FK is part of the PK? Ugh. That was it. I'd completely overlooked that... silly me. Well I didn't create the entity, so I'm pointing the finger to my left to the guy who's already

Re: failing to provide new primary keys

2008-11-17 Thread Chuck Hill
Updating, updateRecords, 375) - failed to save:Adaptor [EMAIL PROTECTED] failed to provide new primary keys for entity 'DiscountConcessionType' java.lang.IllegalStateException: Adaptor [EMAIL PROTECTED] failed to provide new primary keys for entity 'DiscountConcessionType

failing to provide new primary keys

2008-11-17 Thread Lachlan Deck
. all I'm getting is this error. Any ideas? I've checked the model and can't see any problems. 62855 WARN [WorkerThread2] (soap.controllers.Updating, updateRecords, 375) - failed to save:Adaptor [EMAIL PROTECTED] failed to provide new primary keys for entity 'DiscountConc

Re: To Many to EOs w/ Compound Primary Keys that Include Reverse Foreign Key (+INHERITANCE!!!) -- FIX / WORK-AROUND

2008-06-15 Thread Lachlan Deck
Hi there, On 15/06/2008, at 6:00 PM, Robert B.Hanviriyapunt wrote: Ok. I completely verified that it is a problem (at least for me, who likes to implement inheritance in my entities, big time!) If you're talking about Vertical Inheritance (i.e., where the parent entity is mapped to a diff

Re: compound primary key ("failed to provide new primary keys")

2008-06-14 Thread Chuck Hill
On Jun 14, 2008, at 10:32 PM, Gavin Eadie wrote: Lucky I love learning! Things I learned: ... in WebObjects, if it's difficult, you're doing it wrongly! Amen. "if it takes more than three lines, you are probably doing it wrong" ... Chuck is always right (even if he doesn't mention fla

Re: compound primary key ("failed to provide new primary keys")

2008-06-14 Thread Gavin Eadie
Lucky I love learning! Things I learned: ... in WebObjects, if it's difficult, you're doing it wrongly! ... Chuck is always right (even if he doesn't mention flattening in his book). ... Apple's documentation for EOF at WO version 4.5 rocks! ... Start with the model and let the database ta

  1   2   >