You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/11/05 19:26:28 UTC
svn commit: r833113 - in /ofbiz/trunk/applications:
party/entitydef/entitymodel.xml product/entitydef/entitymodel.xml
Author: jleroux
Date: Thu Nov 5 18:26:27 2009
New Revision: 833113
URL: http://svn.apache.org/viewvc?rev=833113&view=rev
Log:
Change "Geo Point" title to "Point"
Change the type of relation for Postal Address to GeoPoint from one to many. Because of the elevation field in GeoPoint. A bit scifi for now, but maybe useful one day...)
Thanks to a discussion with Erwan "Relation title not needed on Facility entity" at https://issues.apache.org/jira/browse/OFBIZ-3153 - OFBIZ-3153
Modified:
ofbiz/trunk/applications/party/entitydef/entitymodel.xml
ofbiz/trunk/applications/product/entitydef/entitymodel.xml
Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Thu Nov 5 18:26:27 2009
@@ -1171,7 +1171,7 @@
<relation type="one" fk-name="POST_ADDR_PCGEO" title="PostalCode" rel-entity-name="Geo">
<key-map field-name="postalCodeGeoId" rel-field-name="geoId"/>
</relation>
- <relation type="one" fk-name="POST_ADDR_GEOPT" title="Geo Point" rel-entity-name="GeoPoint">
+ <relation type="many" fk-name="POST_ADDR_GEOPT" title="Point" rel-entity-name="GeoPoint"> <!-- because of the elevation field in GeoPoint we may face a many relationship in future -->
<key-map field-name="geoPointId"/>
</relation>
<index name="ADDRESS1_IDX">
Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Thu Nov 5 18:26:27 2009
@@ -1026,7 +1026,7 @@
<relation type="many" rel-entity-name="FacilityTypeAttr">
<key-map field-name="facilityTypeId"/>
</relation>
- <relation type="one" fk-name="FACILITY_GEOPT" title="Geo Point" rel-entity-name="GeoPoint">
+ <relation type="one" fk-name="FACILITY_GEOPT" title="Point" rel-entity-name="GeoPoint">
<key-map field-name="geoPointId"/>
</relation>
</entity>
Re: svn commit: r833113 - in /ofbiz/trunk/applications: party/entitydef/entitymodel.xml product/entitydef/entitymodel.xml
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Please explain to me how the many relationship will be presented in
the database. I was not suggesting that a contactMechId should be
present on GeoPoint, I was trying to point out that you cannot simply
change a relationship from one to many without making field changes.
Your current relationship definition is attempting to tell the entity
engine that PostalAddress.geoPointId points to many GeoPoints which
obviously isn't possible since GeoPoint.geoPointId is that primary key.
I still the think relationship name is not following best practices.
As Erwan pointed out in the jira issue, a relationship title is
typically only used when there a multiple relationships to the same
entity as a means to distinguish those relationships. PointGeoPoint
has no meaning and would be better as simply GeoPoint.
Regards
Scott
On 6/11/2009, at 11:53 AM, Jacques Le Roux wrote:
> Hi Scott,
>
> Inline..
>
> From: "Scott Gray" <sc...@hotwaxmedia.com>
>> Hi Jacques,
>>
>> Have you tested this? Changing the relationship from one to many
>> implies that there is a contactMechId on the GeoPoint entity but
>> that isn't the case right?
>
> Why would we need contactMechId on GeoPoint ? The relation is
> established through geoPointId and that's enough. Same for Facility.
>
> > Also was it your intention that the relationship name now becomes
>> PointGeoPoint?
>
> Erwan did not like to call getRelated("Geo pointGeoPoint"), and I
> agree it's not beautiful, even if it works (see Jira for more...).
>
>
> Jacques
>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 6/11/2009, at 7:26 AM, jleroux@apache.org wrote:
>>
>>> Author: jleroux
>>> Date: Thu Nov 5 18:26:27 2009
>>> New Revision: 833113
>>>
>>> URL: http://svn.apache.org/viewvc?rev=833113&view=rev
>>> Log:
>>> Change "Geo Point" title to "Point"
>>> Change the type of relation for Postal Address to GeoPoint from
>>> one to many. Because of the elevation field in GeoPoint. A bit
>>> scifi for now, but maybe useful one day...)
>>> Thanks to a discussion with Erwan "Relation title not needed on
>>> Facility entity" at https://issues.apache.org/jira/browse/
>>> OFBIZ-3153 - OFBIZ-3153
>>>
>>> Modified:
>>> ofbiz/trunk/applications/party/entitydef/entitymodel.xml
>>> ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>>>
>>> Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
>>> = = = = = = = =
>>> =
>>> =
>>> ====================================================================
>>> --- ofbiz/trunk/applications/party/entitydef/entitymodel.xml
>>> (original)
>>> +++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Thu
>>> Nov 5 18:26:27 2009
>>> @@ -1171,7 +1171,7 @@
>>> <relation type="one" fk-name="POST_ADDR_PCGEO"
>>> title="PostalCode" rel-entity-name="Geo">
>>> <key-map field-name="postalCodeGeoId" rel-field-
>>> name="geoId"/>
>>> </relation>
>>> - <relation type="one" fk-name="POST_ADDR_GEOPT" title="Geo
>>> Point" rel-entity-name="GeoPoint">
>>> + <relation type="many" fk-name="POST_ADDR_GEOPT"
>>> title="Point" rel-entity-name="GeoPoint"> <!-- because of the
>>> elevation field in GeoPoint we may face a many relationship in
>>> future -->
>>> <key-map field-name="geoPointId"/>
>>> </relation>
>>> <index name="ADDRESS1_IDX">
>>>
>>> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
>>> = = = = = = = =
>>> =
>>> =
>>> ====================================================================
>>> --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>>> (original)
>>> +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>>> Thu Nov 5 18:26:27 2009
>>> @@ -1026,7 +1026,7 @@
>>> <relation type="many" rel-entity-name="FacilityTypeAttr">
>>> <key-map field-name="facilityTypeId"/>
>>> </relation>
>>> - <relation type="one" fk-name="FACILITY_GEOPT" title="Geo
>>> Point" rel-entity-name="GeoPoint">
>>> + <relation type="one" fk-name="FACILITY_GEOPT"
>>> title="Point" rel-entity-name="GeoPoint">
>>> <key-map field-name="geoPointId"/>
>>> </relation>
>>> </entity>
>>>
>>>
>>
>
>
Re: svn commit: r833113 - in /ofbiz/trunk/applications: party/entitydef/entitymodel.xml product/entitydef/entitymodel.xml
Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Scott,
Inline..
From: "Scott Gray" <sc...@hotwaxmedia.com>
> Hi Jacques,
>
> Have you tested this? Changing the relationship from one to many implies that there is a contactMechId on the GeoPoint entity
> but that isn't the case right?
Why would we need contactMechId on GeoPoint ? The relation is established through geoPointId and that's enough. Same for Facility.
> Also was it your intention that the relationship name now becomes
> PointGeoPoint?
Erwan did not like to call getRelated("Geo pointGeoPoint"), and I agree it's not beautiful, even if it works (see Jira for
more...).
Jacques
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 6/11/2009, at 7:26 AM, jleroux@apache.org wrote:
>
>> Author: jleroux
>> Date: Thu Nov 5 18:26:27 2009
>> New Revision: 833113
>>
>> URL: http://svn.apache.org/viewvc?rev=833113&view=rev
>> Log:
>> Change "Geo Point" title to "Point"
>> Change the type of relation for Postal Address to GeoPoint from one to many. Because of the elevation field in GeoPoint. A bit
>> scifi for now, but maybe useful one day...)
>> Thanks to a discussion with Erwan "Relation title not needed on Facility entity" at
>> https://issues.apache.org/jira/browse/OFBIZ-3153 - OFBIZ-3153
>>
>> Modified:
>> ofbiz/trunk/applications/party/entitydef/entitymodel.xml
>> ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>>
>> Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
>> = = = = = = = = ======================================================================
>> --- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
>> +++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Thu Nov 5 18:26:27 2009
>> @@ -1171,7 +1171,7 @@
>> <relation type="one" fk-name="POST_ADDR_PCGEO" title="PostalCode" rel-entity-name="Geo">
>> <key-map field-name="postalCodeGeoId" rel-field-name="geoId"/>
>> </relation>
>> - <relation type="one" fk-name="POST_ADDR_GEOPT" title="Geo Point" rel-entity-name="GeoPoint">
>> + <relation type="many" fk-name="POST_ADDR_GEOPT" title="Point" rel-entity-name="GeoPoint"> <!-- because of the elevation
>> field in GeoPoint we may face a many relationship in future -->
>> <key-map field-name="geoPointId"/>
>> </relation>
>> <index name="ADDRESS1_IDX">
>>
>> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
>> = = = = = = = = ======================================================================
>> --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
>> +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Thu Nov 5 18:26:27 2009
>> @@ -1026,7 +1026,7 @@
>> <relation type="many" rel-entity-name="FacilityTypeAttr">
>> <key-map field-name="facilityTypeId"/>
>> </relation>
>> - <relation type="one" fk-name="FACILITY_GEOPT" title="Geo Point" rel-entity-name="GeoPoint">
>> + <relation type="one" fk-name="FACILITY_GEOPT" title="Point" rel-entity-name="GeoPoint">
>> <key-map field-name="geoPointId"/>
>> </relation>
>> </entity>
>>
>>
>
>
Re: svn commit: r833113 - in /ofbiz/trunk/applications: party/entitydef/entitymodel.xml product/entitydef/entitymodel.xml
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Hi Jacques,
Have you tested this? Changing the relationship from one to many
implies that there is a contactMechId on the GeoPoint entity but that
isn't the case right?
Also was it your intention that the relationship name now becomes
PointGeoPoint?
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 6/11/2009, at 7:26 AM, jleroux@apache.org wrote:
> Author: jleroux
> Date: Thu Nov 5 18:26:27 2009
> New Revision: 833113
>
> URL: http://svn.apache.org/viewvc?rev=833113&view=rev
> Log:
> Change "Geo Point" title to "Point"
> Change the type of relation for Postal Address to GeoPoint from one
> to many. Because of the elevation field in GeoPoint. A bit scifi for
> now, but maybe useful one day...)
> Thanks to a discussion with Erwan "Relation title not needed on
> Facility entity" at https://issues.apache.org/jira/browse/OFBIZ-3153
> - OFBIZ-3153
>
> Modified:
> ofbiz/trunk/applications/party/entitydef/entitymodel.xml
> ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>
> Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- ofbiz/trunk/applications/party/entitydef/entitymodel.xml
> (original)
> +++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Thu
> Nov 5 18:26:27 2009
> @@ -1171,7 +1171,7 @@
> <relation type="one" fk-name="POST_ADDR_PCGEO"
> title="PostalCode" rel-entity-name="Geo">
> <key-map field-name="postalCodeGeoId" rel-field-name="geoId"/>
> </relation>
> - <relation type="one" fk-name="POST_ADDR_GEOPT" title="Geo
> Point" rel-entity-name="GeoPoint">
> + <relation type="many" fk-name="POST_ADDR_GEOPT" title="Point"
> rel-entity-name="GeoPoint"> <!-- because of the elevation field in
> GeoPoint we may face a many relationship in future -->
> <key-map field-name="geoPointId"/>
> </relation>
> <index name="ADDRESS1_IDX">
>
> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=833113&r1=833112&r2=833113&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml
> (original)
> +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Thu
> Nov 5 18:26:27 2009
> @@ -1026,7 +1026,7 @@
> <relation type="many" rel-entity-name="FacilityTypeAttr">
> <key-map field-name="facilityTypeId"/>
> </relation>
> - <relation type="one" fk-name="FACILITY_GEOPT" title="Geo
> Point" rel-entity-name="GeoPoint">
> + <relation type="one" fk-name="FACILITY_GEOPT" title="Point"
> rel-entity-name="GeoPoint">
> <key-map field-name="geoPointId"/>
> </relation>
> </entity>
>
>