Generic dictionary data with entities?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Generic dictionary data with entities?

Ken Anderson

All,

 

In EOF, I used to decorate entities with additional data in the uerInfo of the entities.  Right now, I would like to add the entity name of the alias entity to the model, so I can access it in the apps.

 

Is there an equivalent function in Cayenne?  I couldn’t find any way to add user info to an entity in the modeler.

 

For example, we have an entity Location, and there’s an entity called LocationAlias.  Rather than put a static string in Location for LocationAlias, I’d rather put something in the model so a generic method could find entities based on alias values.

 

Thanks,

Ken

 

 

Ken Anderson

CTO Amphora, Inc.

Mobile:   +1 914 262 8540

 


www.amphorainc.com

 

Confidentiality Notice: This e-mail and accompanying documents contain confidential information intended for a specific individual and purpose. This e-mailed information is private and protected by law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, or distribution, or the taking of any action based on the contents of this information, is strictly prohibited.
Reply | Threaded
Open this post in threaded view
|

Re: Generic dictionary data with entities?

Michael Gentry-2
Hi Ken,

This isn't doable in CM currently, but is a future goal (at least of mine):

https://github.com/apache/cayenne-modeler

Just haven't gotten there yet.

mrg


On Fri, Feb 10, 2017 at 2:09 PM, Ken Anderson <[hidden email]>
wrote:

> All,
>
>
>
> In EOF, I used to decorate entities with additional data in the uerInfo of
> the entities.  Right now, I would like to add the entity name of the alias
> entity to the model, so I can access it in the apps.
>
>
>
> Is there an equivalent function in Cayenne?  I couldn’t find any way to
> add user info to an entity in the modeler.
>
>
>
> For example, we have an entity Location, and there’s an entity called
> LocationAlias.  Rather than put a static string in Location for
> LocationAlias, I’d rather put something in the model so a generic method
> could find entities based on alias values.
>
>
>
> Thanks,
>
> Ken
>
>
>
>
>
> *Ken Anderson*
>
> CTO Amphora, Inc.
>
> Mobile:   +1 914 262 8540 <(914)%20262-8540>
>
>
>
> [image: id:image001.png@01CE8142.D18AEB10]
>
>
> www.amphorainc.com
>
>
> Confidentiality Notice: This e-mail and accompanying documents contain
> confidential information intended for a specific individual and purpose.
> This e-mailed information is private and protected by law. If you are not
> the intended recipient, you are hereby notified that any disclosure,
> copying, or distribution, or the taking of any action based on the contents
> of this information, is strictly prohibited.
>
Reply | Threaded
Open this post in threaded view
|

Re: Generic dictionary data with entities?

John Huss
Another option is to create a separate file and put things there, like a
properties file or a json document or something.  It's not a bad solution.

On Fri, Feb 10, 2017 at 1:20 PM Michael Gentry <[hidden email]>
wrote:

> Hi Ken,
>
> This isn't doable in CM currently, but is a future goal (at least of mine):
>
> https://github.com/apache/cayenne-modeler
>
> Just haven't gotten there yet.
>
> mrg
>
>
> On Fri, Feb 10, 2017 at 2:09 PM, Ken Anderson <[hidden email]
> >
> wrote:
>
> > All,
> >
> >
> >
> > In EOF, I used to decorate entities with additional data in the uerInfo
> of
> > the entities.  Right now, I would like to add the entity name of the
> alias
> > entity to the model, so I can access it in the apps.
> >
> >
> >
> > Is there an equivalent function in Cayenne?  I couldn’t find any way to
> > add user info to an entity in the modeler.
> >
> >
> >
> > For example, we have an entity Location, and there’s an entity called
> > LocationAlias.  Rather than put a static string in Location for
> > LocationAlias, I’d rather put something in the model so a generic method
> > could find entities based on alias values.
> >
> >
> >
> > Thanks,
> >
> > Ken
> >
> >
> >
> >
> >
> > *Ken Anderson*
> >
> > CTO Amphora, Inc.
> >
> > Mobile:   +1 914 262 8540 <(914)%20262-8540> <(914)%20262-8540>
> >
> >
> >
> > [image: id:image001.png@01CE8142.D18AEB10]
> >
> >
> > www.amphorainc.com
> >
> >
> > Confidentiality Notice: This e-mail and accompanying documents contain
> > confidential information intended for a specific individual and purpose.
> > This e-mailed information is private and protected by law. If you are not
> > the intended recipient, you are hereby notified that any disclosure,
> > copying, or distribution, or the taking of any action based on the
> contents
> > of this information, is strictly prohibited.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Generic dictionary data with entities?

Michael Gentry
On Fri, Feb 10, 2017 at 3:08 PM, John Huss <[hidden email]> wrote:

> Another option is to create a separate file and put things there, like a
> properties file or a json document or something.  It's not a bad solution.
>

Yeah, I was just answering the question about the CM file itself.  Either
create or own properties or YAML or similar.

mrg
Reply | Threaded
Open this post in threaded view
|

Re: Generic dictionary data with entities?

Aristedes Maniatis-2
On 11/2/17 10:32am, Michael Gentry wrote:

> On Fri, Feb 10, 2017 at 3:08 PM, John Huss <[hidden email]> wrote:
>
>> Another option is to create a separate file and put things there, like a
>> properties file or a json document or something.  It's not a bad solution.
>>
>
> Yeah, I was just answering the question about the CM file itself.  Either
> create or own properties or YAML or similar.
>
> mrg


I'm pretty sure Cayenne doesn't validate the schema at runtime. So you could even add new elements and attributes directly to the XML if you want to forgo a GUI editor.

Ari



--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
Reply | Threaded
Open this post in threaded view
|

Re: Generic dictionary data with entities?

Michael Gentry-2
I'm pretty sure any changes to the XML will cause issues.  I just added:

<mrg/>

to one of my Cayenne model files and it blew up on me.

mrg


On Fri, Feb 10, 2017 at 6:37 PM, Aristedes Maniatis <[hidden email]>
wrote:

> On 11/2/17 10:32am, Michael Gentry wrote:
> > On Fri, Feb 10, 2017 at 3:08 PM, John Huss <[hidden email]> wrote:
> >
> >> Another option is to create a separate file and put things there, like a
> >> properties file or a json document or something.  It's not a bad
> solution.
> >>
> >
> > Yeah, I was just answering the question about the CM file itself.  Either
> > create or own properties or YAML or similar.
> >
> > mrg
>
>
> I'm pretty sure Cayenne doesn't validate the schema at runtime. So you
> could even add new elements and attributes directly to the XML if you want
> to forgo a GUI editor.
>
> Ari
>
>
>
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>