[OT] Entity Modeler, how to create a many to many

2007-01-06 Thread Dev WO

Hello,
I've been trying to work with Eclipse/WOProject for my latest  
project, and it seems I can make it:)


But actually I'm stick on something which might be obvious: creating  
a many to many relationship in Entity Modeler.


I used to have to select the 2 entities in EOModeler and do join in  
many to many, but I can't find where's that feature in Entity  
Modeler...
I know I could create the join table, etc but I think I recall a demo  
of EM at WWDC by Mike Schrag doing something like this...but maybe  
I'm wrong.


Could someone tell me how to make a many to many using Entity Modeler:)

Thanks

Xavier

___
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 archive@mail-archive.com


Re: [OT] Entity Modeler, how to create a many to many

2007-01-06 Thread Mike Schrag

And your recall would be right :)

Actually, the latest builds have a much fancier relationship dialog,  
so you might want to upgrade to get all the relationshippy goodness  
if you haven't already.


If you select two entities in the entity tree (outline view), you can  
then click the New Relationship action and it will bring up the New  
Relationship Dialog.  I love the new versions of this because it even  
has an option to add the foreign key attribute for you, too, for non- 
many-to-many's (though I don't recall what it does if you don't use  
Project Wonder -- it uses prototype 'id' when you have Project Wonder).


In the dialog, you can select which sides (or both) of the  
relationship are to-many, you can name the relationships, you can  
optionally have it create a foreign key attribute for one-to-many  
(single foreign key), or you can select the join attributes.


ms

On Jan 6, 2007, at 3:37 AM, Dev WO wrote:


Hello,
I've been trying to work with Eclipse/WOProject for my latest  
project, and it seems I can make it:)


But actually I'm stick on something which might be obvious:  
creating a many to many relationship in Entity Modeler.


I used to have to select the 2 entities in EOModeler and do join  
in many to many, but I can't find where's that feature in Entity  
Modeler...
I know I could create the join table, etc but I think I recall a  
demo of EM at WWDC by Mike Schrag doing something like this...but  
maybe I'm wrong.


Could someone tell me how to make a many to many using Entity  
Modeler:)


Thanks

Xavier

___
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 [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 archive@mail-archive.com


Re: [OT] Entity Modeler, how to create a many to many

2007-01-06 Thread Dev WO

Thanks a lot Mike,
it's just perfect:)

Have a nice week end

Xavier




And your recall would be right :)

Actually, the latest builds have a much fancier relationship  
dialog, so you might want to upgrade to get all the relationshippy  
goodness if you haven't already.


If you select two entities in the entity tree (outline view), you  
can then click the New Relationship action and it will bring up  
the New Relationship Dialog.  I love the new versions of this  
because it even has an option to add the foreign key attribute for  
you, too, for non-many-to-many's (though I don't recall what it  
does if you don't use Project Wonder -- it uses prototype 'id' when  
you have Project Wonder).


In the dialog, you can select which sides (or both) of the  
relationship are to-many, you can name the relationships, you can  
optionally have it create a foreign key attribute for one-to-many  
(single foreign key), or you can select the join attributes.


ms

On Jan 6, 2007, at 3:37 AM, Dev WO wrote:


Hello,
I've been trying to work with Eclipse/WOProject for my latest  
project, and it seems I can make it:)


But actually I'm stick on something which might be obvious:  
creating a many to many relationship in Entity Modeler.


I used to have to select the 2 entities in EOModeler and do join  
in many to many, but I can't find where's that feature in Entity  
Modeler...
I know I could create the join table, etc but I think I recall a  
demo of EM at WWDC by Mike Schrag doing something like this...but  
maybe I'm wrong.


Could someone tell me how to make a many to many using Entity  
Modeler:)


Thanks

Xavier

___
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 [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/webobjects% 
40anazys.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 archive@mail-archive.com


EOSQLExpression's formatValueForAttribute()

2007-01-06 Thread Ricardo Parada

Hi All,

There is a method in EOSQLExpression as follows:

public String formatValueForAttribute(Object value, EOAttribute  
attribute)


which is supposed to format a value as a string ready for inclusion  
in a SQL statement /  query.
However the method doesn't seem to really do what it advertises.  It  
always returns NULL.


So I went ahead and decompiled the subclasses all the way to the  
super class EOSQLExpression:


OraclePlugIn$OracleExpression.javaextends  
JDBCExpression.javaextendsEOSQLExpression.java


What I found out is that I'm right.  The method doesn't do anything.   
Either that or I'm missing something.


I was interested in formatting NSTimestamp and String values mostly.

I see EOSQLExpression has formatStringValue() which I may be able to  
use for String values.  I still need something for NSTimestamp values  
and I may have to write my own.


Any advise on this is appreciated.

Thanks

___
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 archive@mail-archive.com


Re: EOSQLExpression's formatValueForAttribute()

2007-01-06 Thread Ray Kiddy


On Jan 6, 2007, at 8:17 AM, Ricardo Parada wrote:


Hi All,

There is a method in EOSQLExpression as follows:

public String formatValueForAttribute(Object value, EOAttribute  
attribute)


which is supposed to format a value as a string ready for inclusion  
in a SQL statement /  query.
However the method doesn't seem to really do what it advertises.   
It always returns NULL.


So I went ahead and decompiled the subclasses all the way to the  
super class EOSQLExpression:


OraclePlugIn$OracleExpression.javaextends  
JDBCExpression.javaextendsEOSQLExpression.java


What I found out is that I'm right.  The method doesn't do  
anything.  Either that or I'm missing something.


I was interested in formatting NSTimestamp and String values mostly.

I see EOSQLExpression has formatStringValue() which I may be able  
to use for String values.  I still need something for NSTimestamp  
values and I may have to write my own.


Any advise on this is appreciated.

Thanks



Decompilation is not guaranteed to give you the complete method. In  
this method, one of the things it does is return null, but that is  
not all it does. But it does not have any smarts about any particular  
adaptor and all it can do is call toString() on something.


But this is why the javadoc for the method says:

This method should be overridden by subclasses to return a string  
representation of value suitable for use in an SQL statement,  
depending on attribute's externalType.


This is also why the EOSQLExpression class is abstract. There are  
implementations for some things, so that subclasses are saved some  
heavy lifting, but there are things it should not try to do.


What is the behavior of the subclass of EOSQLExpression in the  
adaptor that you are using? Perhaps it is not doing enough in this case.


- ray

___
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 archive@mail-archive.com