Hey all, thank you for your help so far! The latest thing I have been
looking at is how to dynamically update the mapping files in cayenne. I see
some methods available but I wanted to know what best practices were for
this situation.

For example, I am using the tutorial so I have an ARTIST, GALLERY and
PAINTING table. I'm going to start the system running, then after I've
initialized Cayenne I will dynamically change the TestAppMap.map.xml to add
this new db-entity:

<db-entity name="USER">
<db-attribute name="UserID" type="BIGINT"/>
<db-attribute name="Name" type="VARCHAR" length="255"/>

No Foriegn Keys, no Objects, just a new db-entity for now. After I do this
to the TestAppMap.map.xml how do I tell Cayenne to reload? I've been looking
around and I don't see a clear method. I noticed these methods on


It seems like I would be making those method calls. Before I go down that
rabbit hole I wanted to make sure I was on the right track. Should I be
making these calls or is there a recommended way for doing what I'm doing?
The other way that seemed possible was something like this:

And then just wait for the next time this is called:
ObjectContext context = DataContext.createDataContext();

Would tha do the same thing? Since the file that it had used last time will
be updated so it would be reading from the same source?

As usual any help would be greatly appreciated.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupuser @
postedOct 27, '10 at 1:28p
activeOct 27, '10 at 1:28p

1 user in discussion

Caden whitaker: 1 post



site design / logo © 2022 Grokbase