This is very strange for me - need help

2008-05-30 Thread Amedeo Mantica

I got this error:


[2008-5-30 18:31:43 CEST] WorkerThread0  
com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression  
failed: com.webobjects.jdbcadaptor.OpenBasePlugIn$OpenBaseExpression:  
INSERT INTO INDBLocalizedString(it, de, id, en) VALUES (?, ?, ?, ?)  
withBindings: 1:write ITghgf(it), 2:write DE(de), 3:128(id),  
4:write EN(en):
Next exception:SQL State:42000 -- error code: 0 -- msg: ERROR -  
Value for column 'id' is not unique.
SQL: INSERT INTO INDBLocalizedString(it, de, id, en) VALUES ('write  
ITghgf', 'write DE', 128, 'write EN')



I checked and rechecked, the value for column ID is UNIQUE!!!
also typing the SQL directly into database works!

Any suggestion?!!
Thanks
Amedeo ___
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 [EMAIL PROTECTED]

Re: This is very strange for me - need help

2008-05-30 Thread Simon McLean

It's a SQL error so the complaint is from your DB.

I would try dropping the contents of your EO PK table and see if it  
goes away.


Simon

On 30 May 2008, at 17:38, Amedeo Mantica wrote:


I got this error:


[2008-5-30 18:31:43 CEST] WorkerThread0  
com.webobjects.eoaccess.EOGeneralAdaptorException:  
EvaluateExpression failed: com.webobjects.jdbcadaptor.OpenBasePlugIn 
$OpenBaseExpression: INSERT INTO INDBLocalizedString(it, de, id,  
en) VALUES (?, ?, ?, ?) withBindings: 1:write ITghgf(it),  
2:write DE(de), 3:128(id), 4:write EN(en):
Next exception:SQL State:42000 -- error code: 0 -- msg: ERROR -  
Value for column 'id' is not unique.
SQL: INSERT INTO INDBLocalizedString(it, de, id, en) VALUES ('write  
ITghgf', 'write DE', 128, 'write EN')



I checked and rechecked, the value for column ID is UNIQUE!!!
also typing the SQL directly into database works!

Any suggestion?!!
Thanks
Amedeo
___
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/simon_mclean%40mac.com

This email sent to [EMAIL PROTECTED]


 ___
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 [EMAIL PROTECTED]

Re: This is very strange for me - need help

2008-05-30 Thread Alan Ward


My guess is that you are doing the insert twice in the same  
transaction.  The transaction is then rolled back and consequently you
can manually insert the same values with no violation of the  
uniqueness constraint.  Turn on EOAdaptorDebugEnabled and

watch the SQL that's generated to get a better idea of what's going on.

Alan

On May 30, 2008, at 10:38 AM, Amedeo Mantica wrote:


I got this error:


[2008-5-30 18:31:43 CEST] WorkerThread0  
com.webobjects.eoaccess.EOGeneralAdaptorException:  
EvaluateExpression failed:  
com.webobjects.jdbcadaptor.OpenBasePlugIn$OpenBaseExpression:  
INSERT INTO INDBLocalizedString(it, de, id, en) VALUES  
(?, ?, ?, ?) withBindings: 1:write ITghgf(it), 2:write DE(de),  
3:128(id), 4:write EN(en):
Next exception:SQL State:42000 -- error code: 0 -- msg: ERROR -  
Value for column 'id' is not unique.
SQL: INSERT INTO INDBLocalizedString(it, de, id, en) VALUES ('write  
ITghgf', 'write DE', 128, 'write EN')



I checked and rechecked, the value for column ID is UNIQUE!!!
also typing the SQL directly into database works!

Any suggestion?!!
Thanks
Amedeo
 ___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


 ___
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 [EMAIL PROTECTED]

Compiler Warnings for NSSelector

2008-05-30 Thread Mr. Frank Cobia
This maybe an easy question, but I could not think of the answer right  
now. The constants for EOQualifier (i.e. QualifierOperatorEquals) are  
of type NSSelector. However, NSSelector is defined as NSSelectorT so  
the compiler wants me to give it a type when I reference it. So that I  
can get rid of the compiler warnings, what is the type for the  
NSSelectors in EOQualifier?


Thanks,
Frank
___
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 [EMAIL PROTECTED]


Fetching abstract entity

2008-05-30 Thread Jean-François Veillette
I have 2 models, one which contain a set of abstract eoentity,  
another one which contain a set of concret eoentity (subclasses of  
the abstract set).


It was working just right, but suddently after reinstalling one of  
the framework, it just stopped working.  I can't make it work again.
Whenever I fetch an abstract entity (assuming, I will get objects of  
the concrete entity), it now return me an object of the abstract  
entity type.


Details ...
A - abstract eoentity name
CA - java classe for eoentity 'A'
B - concrete eoentity name, sub-entity of 'A'
CB - java classe of 'B'

NSMutableDictionary dict = new NSMutableDictionary();
dict.takeValueForKey(k1, key1);
dict.takeValueForKey(k2, key2);
expectCBInstance = (CB) EOUtilities.objectMatchingValues 
(ec, A, dict);


But EOUtilities return me CA instances.
Any idea why EOF fetch abstract entity and not the concrete one ?

Thanks,

- jfv

 ___
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 [EMAIL PROTECTED]

Re: Fetching abstract entity

2008-05-30 Thread Chuck Hill


On May 30, 2008, at 11:17 AM, Jean-François Veillette wrote:

I have 2 models, one which contain a set of abstract eoentity,  
another one which contain a set of concret eoentity (subclasses of  
the abstract set).


It was working just right, but suddently after reinstalling one of  
the framework, it just stopped working.  I can't make it work again.
Whenever I fetch an abstract entity (assuming, I will get objects of  
the concrete entity), it now return me an object of the  
abstract entity type.


Details ...
A - abstract eoentity name
CA - java classe for eoentity 'A'
B - concrete eoentity name, sub-entity of 'A'
CB - java classe of 'B'

NSMutableDictionary dict = new NSMutableDictionary();
dict.takeValueForKey(k1, key1);
dict.takeValueForKey(k2, key2);
expectCBInstance = (CB)  
EOUtilities.objectMatchingValues(ec, A, dict);


But EOUtilities return me CA instances.
Any idea why EOF fetch abstract entity and not the concrete one ?


Which kind of inheritance (single table, vertical, horizontal)?

Did the restricting qualifiers get lost or changed in the model or  
database?


Chuck


--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Fetching abstract entity

2008-05-30 Thread Chuck Hill


On May 30, 2008, at 12:35 PM, Jean-François Veillette wrote:



More details ...
single table inheritance,
no restricting qualifiers, there is only one concrete entity for one  
abstract entity.


I have never used it like that.  I expected that you would still need  
the restricting qualifier.


Chuck


Le 08-05-30 à 15:14, Chuck Hill a écrit :



On May 30, 2008, at 11:17 AM, Jean-François Veillette wrote:

I have 2 models, one which contain a set of abstract eoentity,  
another one which contain a set of concret eoentity (subclasses of  
the abstract set).


It was working just right, but suddently after reinstalling one of  
the framework, it just stopped working.  I can't make it work again.
Whenever I fetch an abstract entity (assuming, I will get objects  
of the concrete entity), it now return me an object of the  
abstract entity type.


Details ...
A - abstract eoentity name
CA - java classe for eoentity 'A'
B - concrete eoentity name, sub-entity of 'A'
CB - java classe of 'B'

   NSMutableDictionary dict = new NSMutableDictionary();
   dict.takeValueForKey(k1, key1);
   dict.takeValueForKey(k2, key2);
   expectCBInstance = (CB)  
EOUtilities.objectMatchingValues(ec, A, dict);


But EOUtilities return me CA instances.
Any idea why EOF fetch abstract entity and not the concrete one ?


Which kind of inheritance (single table, vertical, horizontal)?

Did the restricting qualifiers get lost or changed in the model or  
database?


Chuck





--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Fetching abstract entity

2008-05-30 Thread Chuck Hill
The other possibility is that the model with the subclasses is not  
getting loaded.  Maybe not under Resources/ in the Eclipse built  
framework?



On May 30, 2008, at 12:44 PM, Jean-François Veillette wrote:


I have never needed the qualifier before.
This is a project freshly switched from xcode to eclipse, so things  
may not be stable yet in eclipse for this project.
Anyway, I'll try to add the qualifier on 'B' and hope it works ...  
and see what kind of sql it generate.


- jfv

Le 08-05-30 à 15:37, Chuck Hill a écrit :



On May 30, 2008, at 12:35 PM, Jean-François Veillette wrote:



More details ...
single table inheritance,
no restricting qualifiers, there is only one concrete entity for  
one abstract entity.


I have never used it like that.  I expected that you would still  
need the restricting qualifier.


Chuck


Le 08-05-30 à 15:14, Chuck Hill a écrit :



On May 30, 2008, at 11:17 AM, Jean-François Veillette wrote:

I have 2 models, one which contain a set of abstract eoentity,  
another one which contain a set of concret eoentity (subclasses  
of the abstract set).


It was working just right, but suddently after reinstalling one  
of the framework, it just stopped working.  I can't make it work  
again.
Whenever I fetch an abstract entity (assuming, I will get  
objects of the concrete entity), it now return me an object  
of the abstract entity type.


Details ...
A - abstract eoentity name
CA - java classe for eoentity 'A'
B - concrete eoentity name, sub-entity of 'A'
CB - java classe of 'B'

  NSMutableDictionary dict = new NSMutableDictionary();
  dict.takeValueForKey(k1, key1);
  dict.takeValueForKey(k2, key2);
  expectCBInstance = (CB)  
EOUtilities.objectMatchingValues(ec, A, dict);


But EOUtilities return me CA instances.
Any idea why EOF fetch abstract entity and not the concrete one ?


Which kind of inheritance (single table, vertical, horizontal)?

Did the restricting qualifiers get lost or changed in the model  
or database?


Chuck




--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Fwd: Relationship across model boundaries failing

2008-05-30 Thread Gennady Kushnir
Flattening relationshops (consequently - many-to-many relations) does
not work across database (consequently - EOModel) boundaries
Unfortunately.
It is mentioned in Using EOModeler manual. So you have to traverse
relationships programmatically I assume.

Gennady

2008/5/29 Juergen Lorenz Simon [EMAIL PROTECTED]:
 Hi,

 I'm trying to model a relationship across two EOF Models:

 Model FirstModel (database name firstmodel)
 Entity A

 Model B (database name secondmodel)
 Entity B

 Now I have an n:m relationship between the two entities. So in Model
 FirstModel,
 I create join tables AB, which has relationships pointing to B.

 A - AB - B

 When I try to add or delete objects, the resulting SQL has the wrong table
 name.
 Instead of looking to firstmodel.AB, it looks for secondmodel.AB instead!
 I'm using Project Wonder, WebObjects 5.3 and MySQL.

 Anyone got an idea what that might be?

 Cheers,
 J.L.Simon
 ___
 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/genkush%40rujel.net

 This email sent to [EMAIL PROTECTED]

 ___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


IMHO you should never flatten a many-to-many (especially across models).

Alan

On May 30, 2008, at 1:47 PM, Gennady Kushnir wrote:


Flattening relationshops (consequently - many-to-many relations) does
not work across database (consequently - EOModel) boundaries
Unfortunately.
It is mentioned in Using EOModeler manual. So you have to traverse
relationships programmatically I assume.

Gennady

2008/5/29 Juergen Lorenz Simon [EMAIL PROTECTED]:

Hi,

I'm trying to model a relationship across two EOF Models:

Model FirstModel (database name firstmodel)
Entity A

Model B (database name secondmodel)
Entity B

Now I have an n:m relationship between the two entities. So in Model
FirstModel,
I create join tables AB, which has relationships pointing to B.

A - AB - B

When I try to add or delete objects, the resulting SQL has the  
wrong table

name.
Instead of looking to firstmodel.AB, it looks for secondmodel.AB  
instead!

I'm using Project Wonder, WebObjects 5.3 and MySQL.

Anyone got an idea what that might be?

Cheers,
J.L.Simon
___
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/genkush% 
40rujel.net


This email sent to [EMAIL PROTECTED]


 ___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
IMHO you should never flatten a many-to-many (especially across  
models).
So this is interesting ... I held this same belief for years until  
about 6 months ago when Chuck convinced me that I was missing out :)   
I had some silly misunderstanding of EOF caching with respect to  
flattened relationships that Chuck proved was wrong.  I've since been  
pretty happy with them (though admittedly I've never crossed model  
boundaries).  I'm curious what you're reasoning for not flattening  
is?  Definitely it will fail across databases boundaries (which  
totally makes sense), but it's not immediately obvious that (or rather  
why) it would fail across model boundaries onto the same database  
(assuming you have the EXACT same connection dictionary between the  
two).


ms

___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


I'm actually somewhat opposed to flattening in any situation but when  
it comes to M-to-M
my justification is more performance related than anything else.  I  
actually omit joins from
the model in certain situations to avoid unwanted fetches and  
flattening is more of a recipe
for disaster than a simple join is.If you're working with a small  
data set then none of this is
a big deal but once you get up into 10's of millions of rows in any  
given table then you have
to be extremely careful with the modeling in order to avoid  
unexpected killer fetches.


You know what I work on and I think our challenges are somewhat  
atypical.  I do believe though
that they have some value as general principals because however small  
your data set is

to begin with, it likely will grow over time.

Alan

On May 30, 2008, at 2:19 PM, Mike Schrag wrote:

IMHO you should never flatten a many-to-many (especially across  
models).
So this is interesting ... I held this same belief for years until  
about 6 months ago when Chuck convinced me that I was missing  
out :)  I had some silly misunderstanding of EOF caching with  
respect to flattened relationships that Chuck proved was wrong.   
I've since been pretty happy with them (though admittedly I've  
never crossed model boundaries).  I'm curious what you're reasoning  
for not flattening is?  Definitely it will fail across databases  
boundaries (which totally makes sense), but it's not immediately  
obvious that (or rather why) it would fail across model boundaries  
onto the same database (assuming you have the EXACT same connection  
dictionary between the two).


ms

___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Chuck Hill


On May 30, 2008, at 1:19 PM, Mike Schrag wrote:

IMHO you should never flatten a many-to-many (especially across  
models).
So this is interesting ... I held this same belief for years until  
about 6 months ago when Chuck convinced me that I was missing  
out :)  I had some silly misunderstanding of EOF caching with  
respect to flattened relationships that Chuck proved was wrong.   
I've since been pretty happy with them (though admittedly I've never  
crossed model boundaries).  I'm curious what you're reasoning for  
not flattening is?  Definitely it will fail across databases  
boundaries (which totally makes sense), but it's not immediately  
obvious that (or rather why) it would fail across model boundaries  
onto the same database (assuming you have the EXACT same connection  
dictionary between the two).



I am curious too.  I'd rather shoot myself than not flatten to many  
relationships.  I'd almost rather use J2EE.  Like Mike says, across  
databases is a problem.  Across models is not if you are sensible  
enough to ensure consistent connection dictionaries when they load  
(which I think is safe to assume here).



Chuck

--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


On May 30, 2008, at 2:32 PM, Chuck Hill wrote:



On May 30, 2008, at 1:19 PM, Mike Schrag wrote:

IMHO you should never flatten a many-to-many (especially across  
models).
So this is interesting ... I held this same belief for years until  
about 6 months ago when Chuck convinced me that I was missing  
out :)  I had some silly misunderstanding of EOF caching with  
respect to flattened relationships that Chuck proved was wrong.   
I've since been pretty happy with them (though admittedly I've  
never crossed model boundaries).  I'm curious what you're  
reasoning for not flattening is?  Definitely it will fail across  
databases boundaries (which totally makes sense), but it's not  
immediately obvious that (or rather why) it would fail across  
model boundaries onto the same database (assuming you have the  
EXACT same connection dictionary between the two).



I am curious too.  I'd rather shoot myself than not flatten to many  
relationships.  I'd almost rather use J2EE.  Like Mike says, across  
databases is a problem.  Across models is not if you are sensible  
enough to ensure consistent connection dictionaries when they load  
(which I think is safe to assume here).


Like I was saying to Mike, it's simply a guard against performance  
issues.  It's like omitting inverse relationships
when you know that it would be suicide if anyone tried to traverse  
(or inadvertently tripped) them.
e.g. transaction - user_agent is a fine relationship to model but  
would you even dream of modeling the inverse relationship?

Maybe you would if you only made one sale a week.

Alan




Chuck

--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
Like I was saying to Mike, it's simply a guard against performance  
issues.  It's like omitting inverse relationships
when you know that it would be suicide if anyone tried to traverse  
(or inadvertently tripped) them.
e.g. transaction - user_agent is a fine relationship to model but  
would you even dream of modeling the inverse relationship?

Maybe you would if you only made one sale a week.
I'm with you here, but the same would be true of the non-flattened,  
right?  If you don't want to fault the relationship, don't model it,  
but that seems to me more of a pragmatic decision about the existence  
(or not) of the relationship rather than specially related to many-to- 
many flattening.  As far as I know, the faulting rules should be the  
same.


ms

___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Guido Neitzer

On 30.05.2008, at 14:31, Alan Ward wrote:

I actually omit joins from the model in certain situations to avoid  
unwanted fetches and flattening is more of a recipe for disaster  
than a simple join is.



But it actually doesn't matter how big your datasets are. The  
interesting question is how big the joins are. I have a database here  
with some ten million entries in it and the biggest to-many is a  
couple of hundred objects - this runs on a dual G4 with a small disk  
array and never gave me any problems.


And I rather have the development speed of flattened relationships and  
working to-many relationships and deal with the consequences when I  
have to. Yes, I had to turn of some back-relationships over time and  
do not model some of the inverse relationships at all, because I know  
they will cause problems, but as an overall rule? No, definitely not.


cug

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

This email sent to [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


I'm sure Chuck will correct me if I'm wrong but my recollection is  
that a flattened to-many will always trip on an

insert or update.

Alan

On May 30, 2008, at 2:48 PM, Guido Neitzer wrote:


On 30.05.2008, at 14:31, Alan Ward wrote:

I actually omit joins from the model in certain situations to  
avoid unwanted fetches and flattening is more of a recipe for  
disaster than a simple join is.



But it actually doesn't matter how big your datasets are. The  
interesting question is how big the joins are. I have a database  
here with some ten million entries in it and the biggest to-many is  
a couple of hundred objects - this runs on a dual G4 with a small  
disk array and never gave me any problems.


And I rather have the development speed of flattened relationships  
and working to-many relationships and deal with the consequences  
when I have to. Yes, I had to turn of some back-relationships over  
time and do not model some of the inverse relationships at all,  
because I know they will cause problems, but as an overall rule?  
No, definitely not.


cug

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

This email sent to [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Guido Neitzer

On 30.05.2008, at 14:59, Alan Ward wrote:

I'm sure Chuck will correct me if I'm wrong but my recollection is  
that a flattened to-many will always trip on an insert or update.


Hmm. What you mean by trip on?

Guido

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

This email sent to [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
I'm sure Chuck will correct me if I'm wrong but my recollection is  
that a flattened to-many will always trip on an insert or update.


Hmm. What you mean by trip on?
Pretty sure Alan is saying that updating or inserting an EO with a  
flattened to-many fires the fault of the to-many.  This would be a  
really bad bug if it's true.  Writing a test case now ...


ms

___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
I'm sure Chuck will correct me if I'm wrong but my recollection is  
that a flattened to-many will always trip on an insert or update.


Hmm. What you mean by trip on?
Pretty sure Alan is saying that updating or inserting an EO with a  
flattened to-many fires the fault of the to-many.  This would be a  
really bad bug if it's true.  Writing a test case now ...
This appears to be OK for the test I'm doing in 5.3 with Wonder.   
Maybe this was a bug in an older version of WO/EOF or maybe Wonder  
fixes this and I just never knew?


I have Person and Company and a many-to-many join between them.  I  
added 100 of each and made each person related to each of the 100  
companies.  I restarted to get a fresh snapshot cache, and if i fetch  
a person, change the person's name and resave, I get the single query  
to fetch the EO and a single query to perform the update and no  
fetches against Company.


ms

___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
I'm sure Chuck will correct me if I'm wrong but my recollection  
is that a flattened to-many will always trip on an insert or  
update.


Hmm. What you mean by trip on?
Pretty sure Alan is saying that updating or inserting an EO with a  
flattened to-many fires the fault of the to-many.  This would be a  
really bad bug if it's true.  Writing a test case now ...
This appears to be OK for the test I'm doing in 5.3 with Wonder.   
Maybe this was a bug in an older version of WO/EOF or maybe Wonder  
fixes this and I just never knew?


I have Person and Company and a many-to-many join between them.  I  
added 100 of each and made each person related to each of the 100  
companies.  I restarted to get a fresh snapshot cache, and if i  
fetch a person, change the person's name and resave, I get the  
single query to fetch the EO and a single query to perform the  
update and no fetches against Company.
Chuck is suggesting to me in AIM that maybe Alan meant that if you add  
or update the flattened to many relationship, it will fire a fault,  
which is definitely true.  But that would be the same if it was just a  
one-to-many, or a non-flattened relationship.  I'm wondering if maybe  
Alan's referring to some behavior in 5.2 where maybe his concern is  
true but maybe has since been fixed?


ms 


___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Chuck Hill


On May 30, 2008, at 1:59 PM, Alan Ward wrote:



I'm sure Chuck will correct me if I'm wrong but my recollection is  
that a flattened to-many will always trip on an

insert or update.


Any to many, flattened or not, will fire the array fault (but not fire  
the faults in the array) when an element is added to or removed from  
the relationship.  I can't think of how flattening would affect this.   
You should see the exact same SQL.  Now it _would_ be nice if EOF  
could just add / remove and mark the snapshot as partial or something  
to avoid this overhead.


Chuck



On May 30, 2008, at 2:48 PM, Guido Neitzer wrote:


On 30.05.2008, at 14:31, Alan Ward wrote:

I actually omit joins from the model in certain situations to  
avoid unwanted fetches and flattening is more of a recipe for  
disaster than a simple join is.



But it actually doesn't matter how big your datasets are. The  
interesting question is how big the joins are. I have a database  
here with some ten million entries in it and the biggest to-many is  
a couple of hundred objects - this runs on a dual G4 with a small  
disk array and never gave me any problems.


And I rather have the development speed of flattened relationships  
and working to-many relationships and deal with the consequences  
when I have to. Yes, I had to turn of some back-relationships over  
time and do not model some of the inverse relationships at all,  
because I know they will cause problems, but as an overall rule?  
No, definitely not.


cug

--
http://www.event-s.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:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
Now it _would_ be nice if EOF could just add / remove and mark the  
snapshot as partial or something to avoid this overhead.
Once every 6 months I think that I should try to fix this in Wonder,  
but at this point I think Pierre would physically attack me at WWDC if  
I try to do this :)


ms

___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


On May 30, 2008, at 3:43 PM, Mike Schrag wrote:

I'm sure Chuck will correct me if I'm wrong but my recollection  
is that a flattened to-many will always trip on an insert or  
update.


Hmm. What you mean by trip on?
Pretty sure Alan is saying that updating or inserting an EO with  
a flattened to-many fires the fault of the to-many.  This would  
be a really bad bug if it's true.  Writing a test case now ...
This appears to be OK for the test I'm doing in 5.3 with Wonder.   
Maybe this was a bug in an older version of WO/EOF or maybe Wonder  
fixes this and I just never knew?


I have Person and Company and a many-to-many join between them.  I  
added 100 of each and made each person related to each of the 100  
companies.  I restarted to get a fresh snapshot cache, and if i  
fetch a person, change the person's name and resave, I get the  
single query to fetch the EO and a single query to perform the  
update and no fetches against Company.
Chuck is suggesting to me in AIM that maybe Alan meant that if you  
add or update the flattened to many relationship, it will fire a  
fault, which is definitely true.  But that would be the same if it  
was just a one-to-many, or a non-flattened relationship.  I'm  
wondering if maybe Alan's referring to some behavior in 5.2 where  
maybe his concern is true but maybe has since been fixed?


No, I meant an insert or update that didn't modify the relationship.   
It sounds like your test shows my recollection to be wrong
with recent WO versions.  I'm pretty sure it was true at some point  
in the past though.


Alan



ms
___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


On May 30, 2008, at 4:14 PM, Alan Ward wrote:



On May 30, 2008, at 3:43 PM, Mike Schrag wrote:

I'm sure Chuck will correct me if I'm wrong but my  
recollection is that a flattened to-many will always trip on  
an insert or update.


Hmm. What you mean by trip on?
Pretty sure Alan is saying that updating or inserting an EO with  
a flattened to-many fires the fault of the to-many.  This would  
be a really bad bug if it's true.  Writing a test case now ...
This appears to be OK for the test I'm doing in 5.3 with Wonder.   
Maybe this was a bug in an older version of WO/EOF or maybe  
Wonder fixes this and I just never knew?


I have Person and Company and a many-to-many join between them.   
I added 100 of each and made each person related to each of the  
100 companies.  I restarted to get a fresh snapshot cache, and if  
i fetch a person, change the person's name and resave, I get the  
single query to fetch the EO and a single query to perform the  
update and no fetches against Company.
Chuck is suggesting to me in AIM that maybe Alan meant that if you  
add or update the flattened to many relationship, it will fire a  
fault, which is definitely true.  But that would be the same if it  
was just a one-to-many, or a non-flattened relationship.  I'm  
wondering if maybe Alan's referring to some behavior in 5.2 where  
maybe his concern is true but maybe has since been fixed?


No, I meant an insert or update that didn't modify the  
relationship.  It sounds like your test shows my recollection to be  
wrong
with recent WO versions.  I'm pretty sure it was true at some point  
in the past though.


Hang on a minute what was flattened in your model?

Alan



Alan



ms
___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


OK, so it sounds like the update is fine but how many SQL statements  
occur when you try to insert a new Person?


Alan

On May 30, 2008, at 4:28 PM, Mike Schrag wrote:

No, I meant an insert or update that didn't modify the  
relationship.  It sounds like your test shows my recollection to  
be wrong
with recent WO versions.  I'm pretty sure it was true at some  
point in the past though.


Hang on a minute what was flattened in your model?

Company
id
name
 people (flattened)

Person
id
name
 companies  (flattened)

(CompanyPerson)
companyID
personID

ms

___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Chuck Hill


On May 30, 2008, at 3:14 PM, Alan Ward wrote:



On May 30, 2008, at 3:43 PM, Mike Schrag wrote:

I'm sure Chuck will correct me if I'm wrong but my recollection  
is that a flattened to-many will always trip on an insert or  
update.


Hmm. What you mean by trip on?
Pretty sure Alan is saying that updating or inserting an EO with  
a flattened to-many fires the fault of the to-many.  This would  
be a really bad bug if it's true.  Writing a test case now ...
This appears to be OK for the test I'm doing in 5.3 with Wonder.   
Maybe this was a bug in an older version of WO/EOF or maybe Wonder  
fixes this and I just never knew?


I have Person and Company and a many-to-many join between them.  I  
added 100 of each and made each person related to each of the 100  
companies.  I restarted to get a fresh snapshot cache, and if i  
fetch a person, change the person's name and resave, I get the  
single query to fetch the EO and a single query to perform the  
update and no fetches against Company.
Chuck is suggesting to me in AIM that maybe Alan meant that if you  
add or update the flattened to many relationship, it will fire a  
fault, which is definitely true.  But that would be the same if it  
was just a one-to-many, or a non-flattened relationship.  I'm  
wondering if maybe Alan's referring to some behavior in 5.2 where  
maybe his concern is true but maybe has since been fixed?


No, I meant an insert or update that didn't modify the  
relationship.  It sounds like your test shows my recollection to be  
wrong
with recent WO versions.  I'm pretty sure it was true at some point  
in the past though.



I don't recall modifying an EO attribute ever firing relationship  
faults.   Mind you, my memory is sometimes selective.



Chuck

--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
OK, so it sounds like the update is fine but how many SQL statements  
occur when you try to insert a new Person?
I would expect an insert to fire the faults in this case, but that  
should be the same for a many-to-many with a join entity as long as  
you are calling addObjectToBothSideBlah on both person and company of  
the join (which you should be to keep them consistent).  As it turns  
out i accidentally deleted my ManyToMany test-case app just now and I  
have to recreate it.  But I definitely expect it to fire the faults  
here.


ms

___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Chuck Hill


On May 30, 2008, at 3:35 PM, Alan Ward wrote:



OK, so it sounds like the update is fine but how many SQL statements  
occur when you try to insert a new Person?


Should be the same, flattened or not flattened:

1. Fetch the Person
2. Fetch the PK for each company to create an array of company faults*
3. Fetch the new PK
4. Write the new Person
5. Write the new join table row

* it would be good if this could be eliminated

Pierre?  Hello?  Feeling up to a challenge?  :-P


Chuck




On May 30, 2008, at 4:28 PM, Mike Schrag wrote:

No, I meant an insert or update that didn't modify the  
relationship.  It sounds like your test shows my recollection to  
be wrong
with recent WO versions.  I'm pretty sure it was true at some  
point in the past though.


Hang on a minute what was flattened in your model?

Company
id
name
 people (flattened)

Person
id
name
 companies  (flattened)

(CompanyPerson)
companyID
personID

ms

___
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/award%40apple.com

This email sent to [EMAIL PROTECTED]


___
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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


On May 30, 2008, at 4:54 PM, Mike Schrag wrote:

OK, so it sounds like the update is fine but how many SQL  
statements occur when you try to insert a new Person?
I would expect an insert to fire the faults in this case, but that  
should be the same for a many-to-many with a join entity as long as  
you are calling addObjectToBothSideBlah on both person and company  
of the join (which you should be to keep them consistent).


So, my memory is still not 100% clear on this one but I think we're  
honing in on why I don't flatten
If the relationship is not flattened then I have the option of not  
using addObjectToBothSides if I know
I am doing an insert and then discarding the EO (i.e. I don't care  
about keeping my object graph
consistent right now). It means I can avoid faulting in a whole slew  
of stuff when I know I don't need it.


Alan

As it turns out i accidentally deleted my ManyToMany test-case app  
just now and I have to recreate it.  But I definitely expect it to  
fire the faults here.


ms

___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


 ___
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 [EMAIL PROTECTED]

Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
So, my memory is still not 100% clear on this one but I think we're  
honing in on why I don't flatten
If the relationship is not flattened then I have the option of not  
using addObjectToBothSides if I know
I am doing an insert and then discarding the EO (i.e. I don't care  
about keeping my object graph
consistent right now). It means I can avoid faulting in a whole slew  
of stuff when I know I don't need it.
This seems right to me, yeah.  That said, my standard approach is that  
if the relationship is too big to fault, then I don't model it.  It's  
VERY rare that I have the relationship modeled but don't want the  
graph in sync.  This same topic came up in the discussions of  
automatic inverse relationship updating in Wonder, actually.


ms ___
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 [EMAIL PROTECTED]

Re: Relationship across model boundaries failing

2008-05-30 Thread Chuck Hill


On May 30, 2008, at 4:06 PM, Alan Ward wrote:



On May 30, 2008, at 4:54 PM, Mike Schrag wrote:

OK, so it sounds like the update is fine but how many SQL  
statements occur when you try to insert a new Person?
I would expect an insert to fire the faults in this case, but that  
should be the same for a many-to-many with a join entity as long as  
you are calling addObjectToBothSideBlah on both person and company  
of the join (which you should be to keep them consistent).


So, my memory is still not 100% clear on this one but I think we're  
honing in on why I don't flatten
If the relationship is not flattened then I have the option of not  
using addObjectToBothSides if I know
I am doing an insert and then discarding the EO (i.e. I don't care  
about keeping my object graph
consistent right now). It means I can avoid faulting in a whole slew  
of stuff when I know I don't need it.


Maybe I am confused.  If you have a flattened to-many, you can also  
not use addObjectToBothSides and get the same behavior, I think.  I  
can't think of why it would be different.  And I have had my coffee  
today!  I think that flattening just removes the need for you to  
manually handle the join table.



Chuck



As it turns out i accidentally deleted my ManyToMany test-case app  
just now and I have to recreate it.  But I definitely expect it to  
fire the faults here.


ms

___
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/award%40apple.com

This email sent to [EMAIL PROTECTED]


___
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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Alan Ward


On May 30, 2008, at 5:19 PM, Mike Schrag wrote:

So, my memory is still not 100% clear on this one but I think  
we're honing in on why I don't flatten
If the relationship is not flattened then I have the option of not  
using addObjectToBothSides if I know
I am doing an insert and then discarding the EO (i.e. I don't care  
about keeping my object graph
consistent right now). It means I can avoid faulting in a whole  
slew of stuff when I know I don't need it.
This seems right to me, yeah.  That said, my standard approach is  
that if the relationship is too big to fault, then I don't model it.


Same here.

It's VERY rare that I have the relationship modeled but don't want  
the graph in sync.


We actually do it a lot.  If you think about our system there are  
some apps that spend 99% of their time
inserting data (think of when something is sold) and there are others  
that spend 99% of their time reading
that same data (think of when something is invoiced).  Those first  
class of apps are not going to traverse
the object graph after the insert and need to be very fast.  The  
other class of apps will fetch and then
traverse the object graph and are not anywhere near as performance  
sensitive.


This same topic came up in the discussions of automatic inverse  
relationship updating in Wonder, actually.


You can probably guess how I feel about that ;-)  I never model  
inverse relationships until I need them

(and even then I sometimes don't)

Alan



ms
 ___
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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


 ___
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 [EMAIL PROTECTED]

Safari timeout

2008-05-30 Thread Ricardo Parada
I connect to my WO application using Safari.  My WO application is  
connected to a remote database.  So my app runs slow.
As a result of this Safari is giving me a timeout error saying that  
the server is not responding.


I had set a preference in Terminal using defaults write  
com.apple.safari to turn off this timeout.  But recently, I started  
getting this timeout again.  I don't know if it was caused by updating  
my OS X to 10.5.3.


Does anybody know how to turn off the timeout error in Safari?  I want  
Safari to wait as long as it takes to get the response.  :-)


Thanks,
Ricardo

___
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 [EMAIL PROTECTED]


Re: Safari timeout

2008-05-30 Thread Chuck Hill

Direct connect or through Apache?


On May 30, 2008, at 5:07 PM, Ricardo Parada wrote:

I connect to my WO application using Safari.  My WO application is  
connected to a remote database.  So my app runs slow.
As a result of this Safari is giving me a timeout error saying that  
the server is not responding.


I had set a preference in Terminal using defaults write  
com.apple.safari to turn off this timeout.  But recently, I started  
getting this timeout again.  I don't know if it was caused by  
updating my OS X to 10.5.3.


Does anybody know how to turn off the timeout error in Safari?  I  
want Safari to wait as long as it takes to get the response.  :-)


Thanks,
Ricardo

___
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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag
It's VERY rare that I have the relationship modeled but don't want  
the graph in sync.


We actually do it a lot.  If you think about our system there are  
some apps that spend 99% of their time
inserting data (think of when something is sold) and there are  
others that spend 99% of their time reading
that same data (think of when something is invoiced).  Those first  
class of apps are not going to traverse
the object graph after the insert and need to be very fast.  The  
other class of apps will fetch and then
traverse the object graph and are not anywhere near as performance  
sensitive.
Now I'm just going to have to go look into fixing this in Wonder.  How  
much effort is expended being scared of inverse faulting (which is a  
problem that seems like it really shouldn't be all THAT hard to fix  
with a little elbow grease)?


ms

___
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 [EMAIL PROTECTED]


Re: Relationship across model boundaries failing

2008-05-30 Thread Mike Schrag


Now I'm just going to have to go look into fixing this in Wonder.   
How much effort is expended being scared of inverse faulting (which  
is a problem that seems like it really shouldn't be all THAT hard to  
fix with a little elbow grease)?
It will definitely take a little more magic to pull off completely and  
testing to see what the side-effects will be, but I have a prototype  
that shows this is pretty straightforward to do.  The one catch is  
that includeObjectsInPropertyWithKey (or whatever that method is) does  
a containsObject(..) call before adding.  To answer that question you  
have to fault the array.  However, it appears to work OK if I just  
make that assume false if it's not faulted at that point.  The  
downside of that is that willChange is called even though once the  
array is eventually faulted, it may turn out that it DIDN'T change  
(because it defers the uniqueness check until the fault actually  
fires).  So basically you get too many willChange calls if you add  
duplicates to an unfaulted array.  This doesn't appear to actually be  
a problem in the limited testing I did, though.  Weekend time ...


ms

___
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 [EMAIL PROTECTED]


Re: Wonder bug?

2008-05-30 Thread Mike Schrag
Am I simply doing something wrong, or have I discovered a bug?I have  
a localized project.  In the Application constructor, I set
Survey says doing something wrong.  You're only setting one of the  
values that matters.  Instead set the property:


er.extensions.ERXApplication.DefaultEncoding=UTF-8

ms

___
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 [EMAIL PROTECTED]


Re: Safari timeout

2008-05-30 Thread Ricardo Parada


Direct connect




On May 30, 2008, at 5:14 PM, Chuck Hill wrote:


Direct connect or through Apache?


On May 30, 2008, at 5:07 PM, Ricardo Parada wrote:

I connect to my WO application using Safari.  My WO application is  
connected to a remote database.  So my app runs slow.
As a result of this Safari is giving me a timeout error saying that  
the server is not responding.


I had set a preference in Terminal using defaults write  
com.apple.safari to turn off this timeout.  But recently, I started  
getting this timeout again.  I don't know if it was caused by  
updating my OS X to 10.5.3.


Does anybody know how to turn off the timeout error in Safari?  I  
want Safari to wait as long as it takes to get the response.  :-)


Thanks,
Ricardo

___
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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







___
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 [EMAIL PROTECTED]


Re: Safari timeout

2008-05-30 Thread Art Isbell

On May 30, 2008, at 2:07 PM, Ricardo Parada wrote:

I connect to my WO application using Safari.  My WO application is  
connected to a remote database.  So my app runs slow.
As a result of this Safari is giving me a timeout error saying that  
the server is not responding.


I had set a preference in Terminal using defaults write  
com.apple.safari to turn off this timeout.  But recently, I started  
getting this timeout again.  I don't know if it was caused by  
updating my OS X to 10.5.3.


Does anybody know how to turn off the timeout error in Safari?  I  
want Safari to wait as long as it takes to get the response.  :-)



	The first Safari beta had a 60-second timeout which was annoying in  
your situation.  At the time, I learned about a Safari defaults  
database key that could be set to a longer timeout.  But subsequent  
Safari versions increased this 60-second timeout to something much  
longer, so it was no longer a problem.  I can't find that defaults  
database key in my current defaults database and I can't recall what  
it was.


	Is the defaults database key that you used to turn off the timeout no  
longer in your defaults database?  If not, have you tried writing it  
again?


Aloha,
Art

___
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 [EMAIL PROTECTED]


Re: Safari timeout

2008-05-30 Thread Ricardo Parada


Well, I did a defaults read com.apple.safari and then searched for  
timeout and nothing.  I also read through all the setting and I can't  
find anything that seems relevant.


I'm currently searching in google.



On May 30, 2008, at 9:32 PM, Art Isbell wrote:


On May 30, 2008, at 2:07 PM, Ricardo Parada wrote:

I connect to my WO application using Safari.  My WO application is  
connected to a remote database.  So my app runs slow.
As a result of this Safari is giving me a timeout error saying that  
the server is not responding.


I had set a preference in Terminal using defaults write  
com.apple.safari to turn off this timeout.  But recently, I started  
getting this timeout again.  I don't know if it was caused by  
updating my OS X to 10.5.3.


Does anybody know how to turn off the timeout error in Safari?  I  
want Safari to wait as long as it takes to get the response.  :-)



	The first Safari beta had a 60-second timeout which was annoying in  
your situation.  At the time, I learned about a Safari defaults  
database key that could be set to a longer timeout.  But subsequent  
Safari versions increased this 60-second timeout to something much  
longer, so it was no longer a problem.  I can't find that defaults  
database key in my current defaults database and I can't recall what  
it was.


	Is the defaults database key that you used to turn off the timeout  
no longer in your defaults database?  If not, have you tried writing  
it again?


Aloha,
Art

___
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/rparada 
%40mac.com


This email sent to [EMAIL PROTECTED]


___
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 [EMAIL PROTECTED]