Retrieving an EO from a serialized Propertylist in database table textfield

2010-02-24 Thread Johan Henselmans
I am trying to get a NSarray of NSDictionaries with Objects from one 
application to another application via a database text field. 

My idea was that I would first serialize the stuff on one side:

setPlistTextField ( NSPropertyListSerialization.stringFromPropertyList( cart() 
) )

next, get it out on the other side:

itemsList= (NSArray) NSPropertyListSerialization.propertyListFromString( 
plistTextField() )

And then from the NSDictionary retrieve the EO Objects with some EOUtilities 
method. 

I first thought that 

Product ciProduct = (Product) EOUtilities.localInstanceOfObject( 
session.myEc(), (nl.netsense.theater.Product) 
tmpCartItem.objectForKey(product) )

would do the trick, but that is not the case (I can imagine that the stuff I am 
sending it is not really a EnterpriseObject.

The NSDictionary that I am getting contains stuff like this:

{performance = nl.netsense.theater.Performance pk:994; total = 11.0; 
qty = 1; product = nl.netsense.theater.Product pk:136; }

Which EOUtilities method would be able to retrieve the EO again from a 
dictionary value like:

performance = nl.netsense.theater.Performance pk:994

?


Johan Henselmans
jo...@netsense.nl



 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Retrieving an EO from a serialized Propertylist in database table textfield

2010-02-24 Thread Andrew Lindesay
Hello Johan;

You really need to serialise a GID and then deserialise the GID and fault it on 
the target system.  NSKeyGlobalID and NSTemporaryGlobalID both conform to 
NSCoding so I guess that you could use that to achieve what you are after?  You 
could also use something like my JSON serialisation as an alternative.

cheers.


 I am trying to get a NSarray of NSDictionaries with Objects from one 
 application to another application via a database text field. 
 
 My idea was that I would first serialize the stuff on one side:
 
 setPlistTextField ( NSPropertyListSerialization.stringFromPropertyList( 
 cart() ) )
 
 next, get it out on the other side:
 
 itemsList= (NSArray) NSPropertyListSerialization.propertyListFromString( 
 plistTextField() )
 
 And then from the NSDictionary retrieve the EO Objects with some EOUtilities 
 method. 
 
 I first thought that 
 
 Product ciProduct = (Product) EOUtilities.localInstanceOfObject( 
 session.myEc(), (nl.netsense.theater.Product) 
 tmpCartItem.objectForKey(product) )
 
 would do the trick, but that is not the case (I can imagine that the stuff I 
 am sending it is not really a EnterpriseObject.
 
 The NSDictionary that I am getting contains stuff like this:
 
 {performance = nl.netsense.theater.Performance pk:994; total = 11.0; 
 qty = 1; product = nl.netsense.theater.Product pk:136; }
 
 Which EOUtilities method would be able to retrieve the EO again from a 
 dictionary value like:
 
 performance = nl.netsense.theater.Performance pk:994
 
 ?

___
Andrew Lindesay
www.lindesay.co.nz

 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Antw: Retrieving an EO from a serialized Propertylist in database tabletextfield

2010-02-24 Thread Andri vonAllmen
Since the entity name and the primary key are known on the target side,
EOUtilities.faultWithPrimaryKeyValue(yourEditingContext, yourEntity,
yourPrimaryKey) will do the job.

PS (again): But since I can't get no sleep because of the olympic
games, I may have entirely missunderstood the actual crux. I apologize,
if this is the case -.-

 Johan Henselmans jo...@netsense.nl schrieb am Mittwoch, 24.
Februar 2010 um
11:14 in Nachricht 45a5f424-39d4-42e4-94ec-26f86f5c0...@netsense.nl:
 I am trying to get a NSarray of NSDictionaries with Objects from one

 application to another application via a database text field. 
 
 My idea was that I would first serialize the stuff on one side:
 
 setPlistTextField (
NSPropertyListSerialization.stringFromPropertyList( 
 cart() ) )
 
 next, get it out on the other side:
 
 itemsList= (NSArray)
NSPropertyListSerialization.propertyListFromString( 
 plistTextField() )
 
 And then from the NSDictionary retrieve the EO Objects with some
EOUtilities 
 method. 
 
 I first thought that 
 
 Product ciProduct = (Product) EOUtilities.localInstanceOfObject( 
 session.myEc(), (nl.netsense.theater.Product) 
 tmpCartItem.objectForKey(product) )
 
 would do the trick, but that is not the case (I can imagine that the
stuff I 
 am sending it is not really a EnterpriseObject.
 
 The NSDictionary that I am getting contains stuff like this:
 
 {performance = nl.netsense.theater.Performance pk:994; total =
11.0; 
 qty = 1; product = nl.netsense.theater.Product pk:136; }
 
 Which EOUtilities method would be able to retrieve the EO again from
a 
 dictionary value like:
 
 performance = nl.netsense.theater.Performance pk:994
 
 ?
 
 
 Johan Henselmans
 jo...@netsense.nl 
 
 
 
  ___
 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:

http://lists.apple.com/mailman/options/webobjects-dev/andri.vonallmen%40cedes

 .com
 
 This email sent to andri.vonall...@cedes.com


--- Disclaimer:
- This email and
contents is for use only by the intended recipient. If you are not the
individual or entity to whom it is addressed, you are hereby formally
notified that any use, copying or distribution of this email and
attachments, in whole or in part, is strictly prohibited. If you have
received this email in error, please notify the sender and delete the
message and attachment(s) from your system. Any views, opinions or
information, expressed or contained in this email, are those of the
sender and not necessarily reflect those of CEDES. To help protect our
environment, please avoid printing out this information unnecessarily.
 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Full URL on dev

2010-02-24 Thread James Cicenia
morning -

Yes that is it. I was using WOApplication apis and they weren't giving me the 
correct info.

Thanks
James




On Feb 23, 2010, at 10:22 PM, Mike Schrag wrote:

 I assume he means via API?
 
 context()._generateCompleteURLs();
 String url = context().urlWithRequestHandlerKey(..)
 context()._generateRelativeURLs();
 
 ms
 
 On Feb 23, 2010, at 10:08 PM, Kieran Kelleher wrote:
 
 Open the launch config in Eclipse. Go to the WO tab and change the WOPort 
 launch property from -1 to a fixed port number.
 
 woport.jpg
 
 
 On Feb 23, 2010, at 6:09 PM, James Cicenia wrote:
 
 Hello -
 
 How do I get the full absolute url in my dev environment...
 
 I need to get something like:
 
 http://10.0.1.200:64420/cgi-bin/WebObjects/ .
 
 Especially the dynamic port number
 
 Thanks
 James
 
 ___
 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:
 http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com
 
 This email sent to kieran_li...@mac.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:
 http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
 
 This email sent to msch...@mdimension.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Oracle connection

2010-02-24 Thread Fabián Montealegre Carvajal
Thank you both. I'll try removing the toMany relationships and convincing my
client to move away from Windows Server.

-- 
Fabián Montealegre Carvajal
 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: failed to provide new primary keys for entity

2010-02-24 Thread Johnny Miller
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 System.out on the relationships I can see they are properly set and not 
null.

Yet, if I System.out on entity.primaryKey I get a return of null.

Could this be a bug in the MySQL plugin?

Thanks,

Johnny

On Feb 23, 2010, at 8:32 PM, Chuck Hill wrote:

 
 On Feb 23, 2010, at 9:05 PM, Johnny Miller wrote:
 
 
 On Feb 23, 2010, at 5:47 PM, Chuck Hill wrote:
 
 
 On Feb 23, 2010, at 7:38 PM, Johnny Miller wrote:
 
 Hi Kieran,
 
 Yeah, I haven't changed anything except to add an attribute to the 
 intermediary table and I also exposed the two to-one relationships in the 
 intermediary table as class properties.
 
 Are 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 relationships.  Attributes.  Are the FK attributes exposed?
 
 
 
 
 
 Have you changed the data types of the keys?
 
 No.
 
 Check the two objects with relationships INTO this join EO.  Are the 
 relationships still set to Propogate Primary Key?
 
 Yes.
 
 Check editingContext().insertedObjects() to ensure that you are not getting 
 TWO of these objects created.
 
 
 Just one object gets created.  It says the pk is null?
 
 thanks,
 
 johnny
 
 
 
 
 Chuck
 
 
 
 I just deleted everything and recreated it again and I'm still getting the 
 same error.
 
 I don't see any SQL getting logged that indicates it's trying to insert a 
 row.  It seems to be erring out before it tries to write to the database.
 
 Thanks for helping,
 
 Johnny
 
 
 
 On Feb 23, 2010, at 5:05 PM, Kieran Kelleher wrote:
 
 
 On Feb 23, 2010, at 3:55 PM, Johnny Miller wrote:
 
 Actually, there is no primary key.  There are just the two 
 multi-occurence keys for the two foreign keys that are propagated by 
 the relationships.
 
 Is the join table setup **exactly** the same as if you let Entity Modeler 
 create it automatically for you via the relationship wizard? If it was, 
 the join would be created automatically.
 
 
 
 I thought that was OK because that's the default when you create a 
 multi-to-multi join.  And I do the exact same thing in another model, 
 which is the really perplexing part.
 
 Do you think just creating a primary key in the database that is auto 
 incremented by MySQL would solve it?
 
 IMHO, Bad idea . probably will not work ... one reason is EOF has 
 no clue what PK was assigned by MySQL automatically in an autoincrement 
 field.. probably more reasons too. If that worked, then why would we 
 even need EO PK TABLE. EOF assigned PKs _before_ inserting a record in 
 the database. MYSQL autoincrement assignment happens _after_ the query is 
 received to insert a record in a table.
 
 
 
 Thanks Don.
 
 
 
 
 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 your primary key is not something that 
 WebObjects can generate (string, etc).
 
 The easiest way to use web objects is to create a primary key that is a 
 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 Miller wrote:
 
 Hi,
 
 I have a many to many join with flattened relationships that I 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 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 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'm using ...
 WO 5.4.3
 Recent version of Wonder
 MySQL 5.1.37, using the MySQL plugin supplied by someone on the list .
 OS X 10.6
 
 stack trace:
 
 IllegalStateException: Adaptor 
 com.webobjects.jdbcadaptor.jdbcadap...@779a639b failed to provide new 
 primary keys for entity 'MAP_Gallery_Image'
 at 
 com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5713)
 at 
 com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:370)
 at 
 com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
 at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
 at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
 at 
 

Re: failed to provide new primary keys for entity

2010-02-24 Thread Chuck Hill


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 System.out on the relationships I can see they are properly set  
and not null.


Yet, if I System.out on entity.primaryKey I get a return of null.

Could this be a bug in the MySQL plugin?


It is almost certainly a defect in your model.





Thanks,

Johnny

On Feb 23, 2010, at 8:32 PM, Chuck Hill wrote:



On Feb 23, 2010, at 9:05 PM, Johnny Miller wrote:



On Feb 23, 2010, at 5:47 PM, Chuck Hill wrote:



On Feb 23, 2010, at 7:38 PM, Johnny Miller wrote:


Hi Kieran,

Yeah, I haven't changed anything except to add an attribute to  
the intermediary table and I also exposed the two to-one  
relationships in the intermediary table as class properties.


Are 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 relationships.  Attributes.  Are the FK attributes exposed?







Have you changed the data types of the keys?


No.

Check the two objects with relationships INTO this join EO.  Are  
the relationships still set to Propogate Primary Key?


Yes.

Check editingContext().insertedObjects() to ensure that you are  
not getting TWO of these objects created.




Just one object gets created.  It says the pk is null?

thanks,

johnny





Chuck




I just deleted everything and recreated it again and I'm still  
getting the same error.


I don't see any SQL getting logged that indicates it's trying to  
insert a row.  It seems to be erring out before it tries to  
write to the database.


Thanks for helping,

Johnny



On Feb 23, 2010, at 5:05 PM, Kieran Kelleher wrote:



On Feb 23, 2010, at 3:55 PM, Johnny Miller wrote:

Actually, there is no primary key.  There are just the two  
multi-occurence keys for the two foreign keys that are  
propagated by the relationships.


Is the join table setup **exactly** the same as if you let  
Entity Modeler create it automatically for you via the  
relationship wizard? If it was, the join would be created  
automatically.





I thought that was OK because that's the default when you  
create a multi-to-multi join.  And I do the exact same thing  
in another model, which is the really perplexing part.


Do you think just creating a primary key in the database that  
is auto incremented by MySQL would solve it?


IMHO, Bad idea . probably will not work ... one reason  
is EOF has no clue what PK was assigned by MySQL automatically  
in an autoincrement field.. probably more reasons too. If  
that worked, then why would we even need EO PK TABLE. EOF  
assigned PKs _before_ inserting a record in the database. MYSQL  
autoincrement assignment happens _after_ the query is received  
to insert a record in a table.





Thanks Don.




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 your primary key is not  
something that WebObjects can generate (string, etc).


The easiest way to use web objects is to create a primary key  
that is a 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 Miller wrote:


Hi,

I have a many to many join with flattened relationships that  
I 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 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 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'm using ...
WO 5.4.3
Recent version of Wonder
MySQL 5.1.37, using the MySQL plugin supplied by someone on  
the list .

OS X 10.6

stack trace:

IllegalStateException: Adaptor  
com.webobjects.jdbcadaptor.jdbcadap...@779a639b failed to  
provide new primary keys for entity 'MAP_Gallery_Image'
at  
com 
.webobjects 
.eoaccess 
.EODatabaseContext 
.prepareForSaveWithCoordinator(EODatabaseContext.java:5713)
at  
com 
.webobjects 
.eocontrol 
.EOObjectStoreCoordinator 
.saveChangesInEditingContext(EOObjectStoreCoordinator.java: 
370)
at  
com 
.webobjects 
.eocontrol 
.EOEditingContext.saveChanges(EOEditingContext.java:3192)

at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
at  
com 
.kahalawai 
.components 

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 System.out on the relationships I can see they are properly set and not 
 null.
 
 Yet, if I System.out on entity.primaryKey I get a return of null.
 
 Could this be a bug in the MySQL plugin?
 
 It is almost certainly a defect in your model.

+ 1

Can you paste the contents of the plist files (or attache the plist files 
themselves) for all the entities involved in the relationships?

I've had times where everything looks fine in Entity Modeler, but the plists 
have problems.

Dave


 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


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; 
}, 
{allowsNull = N; name = id; prototypeName = id; }, 
{
allowsNull = N; 
columnName = PERSON_ID; 
name = personID; 
prototypeName = id; 
}, 
{
allowsNull = Y; 
columnName = TITLE; 
name = title; 
prototypeName = varchar255; 
}, 
{allowsNull = Y; columnName = TYPE; name = type; prototypeName = 
intNumber; }
); 
attributesUsedForLocking = (id, personID); 
className = com.map.eo.ImageGallery; 
classProperties = (createDate, images, person, title, type); 
externalName = GALLERY; 
fetchSpecificationDictionary = {}; 
name = MAP_ImageGallery; 
parent = MAP_Gallery; 
primaryKeyAttributes = (id); 
relationships = (
{definition = mAP_GalleryImages.image; name = images; }, 
{
deleteRule = EODeleteRuleCascade; 
destination = MAP_GalleryImage; 
isToMany = Y; 
joinSemantic = EOInnerJoin; 
joins = ({destinationAttribute = galleryID; sourceAttribute = id; 
}); 
name = mAP_GalleryImages; 
propagatesPrimaryKey = Y; 
}, 
{
destination = MAP_Person; 
isMandatory = Y; 
isToMany = N; 
joinSemantic = EOInnerJoin; 
joins = ({destinationAttribute = id; sourceAttribute = personID; 
}); 
name = person; 
}
); 
restrictingQualifier = type=0; 
}

Lahaina:MAPModel.eomodeld jlmiller$ more MAP_GalleryImage.plist 
{
attributes = (
{
allowsNull = N; 
columnName = GALLERY_ID; 
name = galleryID; 
prototypeName = id; 
}, 
{allowsNull = N; columnName = IMAGE_ID; name = imageID; prototypeName 
= id; }, 
{
allowsNull = Y; 
columnName = POSITION; 
name = position; 
prototypeName = intNumber; 
}
); 
attributesUsedForLocking = (galleryID, imageID); 
className = com.map.eo.GalleryImage; 
classProperties = (gallery, image, position); 
externalName = GALLERY_IMAGE; 
fetchSpecificationDictionary = {}; 
name = MAP_GalleryImage; 
primaryKeyAttributes = (galleryID, imageID); 
relationships = (
{
destination = MAP_ImageGallery; 
isMandatory = Y; 
isToMany = N; 
joinSemantic = EOInnerJoin; 
joins = ({destinationAttribute = id; sourceAttribute = galleryID; 
}); 
name = gallery; 
}, 
{
destination = MAP_Image; 
isMandatory = Y; 
isToMany = N; 
joinSemantic = EOInnerJoin; 
joins = ({destinationAttribute = id; sourceAttribute = imageID; }); 
name = image; 
}
); 
}

Lahaina:MAPModel.eomodeld jlmiller$ more MAP_Image.plist 
{
attributes = (
{
allowsNull = Y; 
columnName = CODE_NAME; 
name = codeName; 
prototypeName = varchar50; 
}, 
{
allowsNull = Y; 
columnName = HEIGHT; 
name = height; 
prototypeName = intNumber; 
}, 
{allowsNull = N; columnName = ID; name = id; prototypeName = id; }, 
{
allowsNull = Y; 
columnName = MIME_TYPE; 
name = mimeType; 
prototypeName = varchar16; 
}, 
{
allowsNull = N; 
columnName = PERSON_ID; 
name = personID; 
prototypeName = id; 
}, 
{
allowsNull = Y; 
columnName = PICTURE_ID; 
name = pictureID; 
prototypeName = id; 
}, 
{allowsNull = Y; columnName = TITLE; name = title; prototypeName = 
varchar50; }, 
{allowsNull = Y; columnName = TYPE; name = type; prototypeName = 
intNumber; }, 
{allowsNull = Y; columnName = WIDTH; name = width; prototypeName = 
intNumber; }
); 
attributesUsedForLocking = (id, personID); 
className = com.map.eo.Image; 
classProperties = (
codeName, 
galleries, 
height, 
mimeType, 
person, 
picture, 
pictureID, 
title, 
type, 
width
); 
externalName = MEDIA; 
fetchSpecificationDictionary = {}; 
name = MAP_Image; 
parent = MAP_Media; 
primaryKeyAttributes = (id); 
relationships = (
{definition = mAP_GalleryImages.gallery; name = galleries; }, 
{
deleteRule = EODeleteRuleCascade; 
destination = 

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 Avendasora wrote:

 
 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 System.out on the relationships I can see they are properly set and 
 not null.
 
 Yet, if I System.out on entity.primaryKey I get a return of null.
 
 Could this be a bug in the MySQL plugin?
 
 It is almost certainly a defect in your model.
 
 + 1
 
 Can you paste the contents of the plist files (or attache the plist files 
 themselves) for all the entities involved in the relationships?
 
 I've had times where everything looks fine in Entity Modeler, but the plists 
 have problems.
 
 Dave
 
 

Johnny Miller
Kahalawai Media Corp
http://www.kahalawai.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


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 local Catholic priest to resolve the issue.
 
 
 On Feb 24, 2010, at 9:08 AM, David Avendasora wrote:
 
 
 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 System.out on the relationships I can see they are properly set and 
 not null.
 
 Yet, if I System.out on entity.primaryKey I get a return of null.
 
 Could this be a bug in the MySQL plugin?
 
 It is almost certainly a defect in your model.
 
 + 1
 
 Can you paste the contents of the plist files (or attache the plist files 
 themselves) for all the entities involved in the relationships?
 
 I've had times where everything looks fine in Entity Modeler, but the plists 
 have problems.
 
 Dave
 
 
 
 Johnny Miller
 Kahalawai Media Corp
 http://www.kahalawai.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


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 different file: sometimes I change a 
properties file, I am sure of it, do an ant install, and the old properties 
file did not get overwritten. 

It seems that sometimes the file routines of Mac OS X-Eclipse do not catch all 
the changes. 

Since then I have gotten the habit of making sure that I do a 'clean project' 
and removing the original install folders in /Library/WebObjects/Applications.



 I'm going to call my local Catholic priest to resolve the issue.
 
 
 On Feb 24, 2010, at 9:08 AM, David Avendasora wrote:
 
 
 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 System.out on the relationships I can see they are properly set and 
 not null.
 
 Yet, if I System.out on entity.primaryKey I get a return of null.
 
 Could this be a bug in the MySQL plugin?
 
 It is almost certainly a defect in your model.
 
 + 1
 
 Can you paste the contents of the plist files (or attache the plist files 
 themselves) for all the entities involved in the relationships?
 
 I've had times where everything looks fine in Entity Modeler, but the plists 
 have problems.
 
 Dave
 
 
 
 Johnny Miller
 Kahalawai Media Corp
 http://www.kahalawai.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:
 http://lists.apple.com/mailman/options/webobjects-dev/johan%40netsense.nl
 
 This email sent to jo...@netsense.nl

Johan Henselmans
jo...@netsense.nl



 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: failed to provide new primary keys for entity

2010-02-24 Thread Kieran Kelleher
I have seen this about 3 or 4 times long time ago - IIRC, the problem was 
something to do with either EC or OSC locking.

In any case, I use MySQL - even the majority of WO users, except Chuck Hill, 
use MySQL - and it works.

-Kieran

On Feb 23, 2010, at 3:00 PM, Johnny Miller wrote:

 Hi,
 
 I have a many to many join with flattened relationships that I 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 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 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'm using ...
 WO 5.4.3
 Recent version of Wonder
 MySQL 5.1.37, using the MySQL plugin supplied by someone on the list .
 OS X 10.6
 
 stack trace:
 
 IllegalStateException: Adaptor 
 com.webobjects.jdbcadaptor.jdbcadap...@779a639b failed to provide new primary 
 keys for entity 'MAP_Gallery_Image'
   at 
 com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5713)
   at 
 com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:370)
   at 
 com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
   at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
   at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
   at 
 com.kahalawai.components.pages.media.SetGalleryImagesPage.saveChanges(SetGalleryImagesPage.java:63)
   ... skipped 68 stack elements
 
 I don't see an insert SQL command in the SQL log.
 
 
 Johnny Miller
 Kahalawai Media Corp
 http://www.kahalawai.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:
 http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com
 
 This email sent to kieran_li...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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