entity question FK join question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

entity question FK join question

snowch
I have an entity that is related to the Uom entity, but only where  
uomTypeId=TIME_FREQ_MEASURE

Is it possible to set this constraint at the entity level?, or
should I create an entity view for this limited subset?, or
should all my services/forms/etc constrain the uomTypeId?

Many thanks,

Chris

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: entity question FK join question

jonwimp
Christopher,

Services/forms/etc, aka application level/layer.

After all, you need to constrain inputs from the end-user first.

Jonathon

Christopher Snow wrote:

> I have an entity that is related to the Uom entity, but only where
> uomTypeId=TIME_FREQ_MEASURE
>
> Is it possible to set this constraint at the entity level?, or
> should I create an entity view for this limited subset?, or
> should all my services/forms/etc constrain the uomTypeId?
>
> Many thanks,
>
> Chris
>
> --This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> --No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date:
> 2/7/2007 3:33 PM
>
>

Reply | Threaded
Open this post in threaded view
|

Re: entity question FK join question

snowch
Jonathon,

I was referring to the Uom Entity in ofbiz common.  I don't want users
to modify the data in the Uom Entity, just to be able to select from the
values Uom's where uomTypeId=TIME_FREQ_MEASURE .

<MyEntity ..
  <field name="proximityDate" ..
  <field name="proximityDateUomId" ..
  ..

I only want to join MyEntity to the Uom entity for Time/Frequency Uom's
as the other Uom's (e.g. Energy) don't make much sense for me.

I was hoping not to do this at the service/application layer as I would
need to specify this constraint in multiple places.

Sorry for the confusion!

Many thanks,

Chris



On Thu, 2007-02-08 at 15:54 +0800, Jonathon -- Improov wrote:

> Christopher,
>
> Services/forms/etc, aka application level/layer.
>
> After all, you need to constrain inputs from the end-user first.
>
> Jonathon
>
> Christopher Snow wrote:
> > I have an entity that is related to the Uom entity, but only where
> > uomTypeId=TIME_FREQ_MEASURE
> >
> > Is it possible to set this constraint at the entity level?, or
> > should I create an entity view for this limited subset?, or
> > should all my services/forms/etc constrain the uomTypeId?
> >
> > Many thanks,
> >
> > Chris
> >
> > --This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> >
> >
> > --No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date:
> > 2/7/2007 3:33 PM
> >
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: entity question FK join question

jonwimp
Christopher,

You can delete all Uoms of uomTypeId not equal to TIME_FREQ_MEASURE. Does that do it?

If you just don't want users modifying the Uom entity at all, you can disable every part in OFBiz
that performs updates to that entity.

Jonathon

Christopher Snow wrote:

> Jonathon,
>
> I was referring to the Uom Entity in ofbiz common.  I don't want users
> to modify the data in the Uom Entity, just to be able to select from the
> values Uom's where uomTypeId=TIME_FREQ_MEASURE .
>
> <MyEntity ..
>   <field name="proximityDate" ..
>   <field name="proximityDateUomId" ..
>   ..
>
> I only want to join MyEntity to the Uom entity for Time/Frequency Uom's
> as the other Uom's (e.g. Energy) don't make much sense for me.
>
> I was hoping not to do this at the service/application layer as I would
> need to specify this constraint in multiple places.
>
> Sorry for the confusion!
>
> Many thanks,
>
> Chris
>
>
>
> On Thu, 2007-02-08 at 15:54 +0800, Jonathon -- Improov wrote:
>> Christopher,
>>
>> Services/forms/etc, aka application level/layer.
>>
>> After all, you need to constrain inputs from the end-user first.
>>
>> Jonathon
>>
>> Christopher Snow wrote:
>>> I have an entity that is related to the Uom entity, but only where
>>> uomTypeId=TIME_FREQ_MEASURE
>>>
>>> Is it possible to set this constraint at the entity level?, or
>>> should I create an entity view for this limited subset?, or
>>> should all my services/forms/etc constrain the uomTypeId?
>>>
>>> Many thanks,
>>>
>>> Chris
>>>
>>> --This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>>
>>> --No virus found in this incoming message.
>>> Checked by AVG Free Edition.
>>> Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date:
>>> 2/7/2007 3:33 PM
>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: entity question FK join question

Jacopo Cappellato
In reply to this post by snowch
Christopher,

this is a good question, but I'm pretty sure that there is nothing
currently implemented at the entity level that allows you to set this
kind of constraint in an entity-view definition (but I could be wrong).
I think that for now you'll have to 'manually' set it in services and forms.

Jacopo

Christopher Snow wrote:

> I have an entity that is related to the Uom entity, but only where
> uomTypeId=TIME_FREQ_MEASURE
>
> Is it possible to set this constraint at the entity level?, or
> should I create an entity view for this limited subset?, or
> should all my services/forms/etc constrain the uomTypeId?
>
> Many thanks,
>
> Chris
>
> --This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.


Reply | Threaded
Open this post in threaded view
|

Re: entity question FK join question

Jacopo Cappellato
In reply to this post by jonwimp
Christopher,

Jonathon -- Improov wrote:
> Christopher,
>
> You can delete all Uoms of uomTypeId not equal to TIME_FREQ_MEASURE.
> Does that do it?
>

No, you can't. Or at least, be careful if you remove values from there.
For example all the currencies are also stored in that entity and if you
use the system to process orders you'll need at least one currency.

> If you just don't want users modifying the Uom entity at all, you can
> disable every part in OFBiz that performs updates to that entity.
>

This doesn't make sense to me...

Jacopo

> Jonathon
>
> Christopher Snow wrote:
>> Jonathon,
>>
>> I was referring to the Uom Entity in ofbiz common.  I don't want users
>> to modify the data in the Uom Entity, just to be able to select from the
>> values Uom's where uomTypeId=TIME_FREQ_MEASURE .
>>
>> <MyEntity ..
>>   <field name="proximityDate" ..
>>   <field name="proximityDateUomId" ..
>>   ..
>>
>> I only want to join MyEntity to the Uom entity for Time/Frequency Uom's
>> as the other Uom's (e.g. Energy) don't make much sense for me.
>>
>> I was hoping not to do this at the service/application layer as I would
>> need to specify this constraint in multiple places.
>>
>> Sorry for the confusion!
>>
>> Many thanks,
>>
>> Chris
>>
>>
>>
>> On Thu, 2007-02-08 at 15:54 +0800, Jonathon -- Improov wrote:
>>> Christopher,
>>>
>>> Services/forms/etc, aka application level/layer.
>>>
>>> After all, you need to constrain inputs from the end-user first.
>>>
>>> Jonathon
>>>
>>> Christopher Snow wrote:
>>>> I have an entity that is related to the Uom entity, but only where
>>>> uomTypeId=TIME_FREQ_MEASURE
>>>>
>>>> Is it possible to set this constraint at the entity level?, or
>>>> should I create an entity view for this limited subset?, or
>>>> should all my services/forms/etc constrain the uomTypeId?
>>>>
>>>> Many thanks,
>>>>
>>>> Chris
>>>>
>>>> --This message has been scanned for viruses and
>>>> dangerous content by MailScanner, and is
>>>> believed to be clean.
>>>>
>>>>
>>>> --No virus found in this incoming message.
>>>> Checked by AVG Free Edition.
>>>> Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date:
>>>> 2/7/2007 3:33 PM
>>>>
>>>>
>>>
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: entity question FK join question

jonwimp
 > No, you can't. Or at least, be careful if you remove values from there.
 > For example all the currencies are also stored in that entity and if you
 > use the system to process orders you'll need at least one currency.

Christopher said:
 >>> I only want to join MyEntity to the Uom entity for Time/Frequency Uom's as
 >>> the other Uom's (e.g. Energy) don't make much sense for me.

Yeah, I was wondering what kind of ERP system was being planned that didn't require currencies.

I can't think of any way to create a constraint to force joins to a subset of Uoms. Application
level is the best I can imagine.

Perhaps create another entity, say LimitedUoms, that maps to subset of Uoms? Link MyEntity to
LimitedUoms.

 >> If you just don't want users modifying the Uom entity at all, you can
 >> disable every part in OFBiz that performs updates to that entity.
 >>
 >
 > This doesn't make sense to me...

Christopher said:
 >>> I don't want users to modify the data in the Uom Entity

Jonathon

Jacopo Cappellato wrote:

> Christopher,
>
> Jonathon -- Improov wrote:
>> Christopher,
>>
>> You can delete all Uoms of uomTypeId not equal to TIME_FREQ_MEASURE.
>> Does that do it?
>>
>
> No, you can't. Or at least, be careful if you remove values from there.
> For example all the currencies are also stored in that entity and if you
> use the system to process orders you'll need at least one currency.
>
>> If you just don't want users modifying the Uom entity at all, you can
>> disable every part in OFBiz that performs updates to that entity.
>>
>
> This doesn't make sense to me...
>
> Jacopo
>
>> Jonathon
>>
>> Christopher Snow wrote:
>>> Jonathon,
>>>
>>> I was referring to the Uom Entity in ofbiz common.  I don't want users
>>> to modify the data in the Uom Entity, just to be able to select from the
>>> values Uom's where uomTypeId=TIME_FREQ_MEASURE .
>>>
>>> <MyEntity ..
>>>   <field name="proximityDate" ..
>>>   <field name="proximityDateUomId" ..
>>>   ..
>>>
>>> I only want to join MyEntity to the Uom entity for Time/Frequency Uom's
>>> as the other Uom's (e.g. Energy) don't make much sense for me.
>>>
>>> I was hoping not to do this at the service/application layer as I would
>>> need to specify this constraint in multiple places.
>>>
>>> Sorry for the confusion!
>>>
>>> Many thanks,
>>>
>>> Chris
>>>
>>>
>>>
>>> On Thu, 2007-02-08 at 15:54 +0800, Jonathon -- Improov wrote:
>>>> Christopher,
>>>>
>>>> Services/forms/etc, aka application level/layer.
>>>>
>>>> After all, you need to constrain inputs from the end-user first.
>>>>
>>>> Jonathon
>>>>
>>>> Christopher Snow wrote:
>>>>> I have an entity that is related to the Uom entity, but only where
>>>>> uomTypeId=TIME_FREQ_MEASURE
>>>>>
>>>>> Is it possible to set this constraint at the entity level?, or
>>>>> should I create an entity view for this limited subset?, or
>>>>> should all my services/forms/etc constrain the uomTypeId?
>>>>>
>>>>> Many thanks,
>>>>>
>>>>> Chris
>>>>>
>>>>> --This message has been scanned for viruses and
>>>>> dangerous content by MailScanner, and is
>>>>> believed to be clean.
>>>>>
>>>>>
>>>>> --No virus found in this incoming message.
>>>>> Checked by AVG Free Edition.
>>>>> Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date:
>>>>> 2/7/2007 3:33 PM
>>>>>
>>>>>
>>>>
>>>
>>>
>
>
>