[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [dali-dev] a few more Dali questions (extending entity generation, etc)
|
Alright...let's tackle these questions!
1) Is there a way when generating entities to tell Dali that I want my
entity classes added into the class list in the persistence.xml? For
performance reasons, I want to have all of my classes listed there; also
for Java SE scenarios this is a necessary requirement.
For M6 we should have a way to perform a user directed syncing of your
persistence.xml with the Entities in your project. This functionality
was in 0.5 and we will be bringing it back for 1.0. In addition to this
functionality, we would like to have a preference driven setting that
would always keep your persistence.xml in sync with your current
Entities. For Entity Generation, we could have an option that ensured a
sync was performed post generation. Enter an enhancement request for
this if you could and I'm guessing it will make it into 1.0.
2) I know previously Neil mentioned that in an upcoming release that
Dali would allow you to have your connection information placed into the
persistence.xml for you. Will there be some way to decide between a
datasource or a driver-managed connection? That is, if I have a
datasource set up, I would just want the jta-data-source written to the
persistence.xml; otherwise I would need all of the individual provider
properties written out detailing my connection info. Will these
scenarios be handled?
Yes, we intend to handle both of these scenarios.
3) I'm interested in extending Dali entity generation to handle things
like generating additional constructors in the entities, or to generate
some default namedQueries. I believe that I can hook into the Entity
Generation framework somehow and perhaps provide my own subclassed
Entity Generator. Is this currently possible? It would be nice to be
able to specify my EntityGenerator in a plugin and then perhaps be able
to choose that from a list of generator providers (or set it up
programatically beforehand) and have the entity generation wizard call
by EntityGenerator. Is something like this currently possible?
What you describe isn't currently possible. We need to come up with
general concept for how we expect extenders to enhance/replace entity
generation inside the general Dali framework. It is possible that this
could be set up as an independent extension point, or something that is
tied into the Platform concept. I suggest opening an enhancement
request and putting your thoughts on the matter into the ER. Other
extenders also have thoughts on this, so we can evaluate the options and
determine what is feasible for the 1.0 release in this area.
4) Along these same lines, if I want to update the model before
generation to add things like setting up an OCC column or additional
relationships, can I do so? That is, is this entity model exposed so I
can update it so that it will generate what I want?
It seems that you are referring to the DB model that we are using as the
basis for our Entity Generation. The DB model that we generate from is
the actual Database Definition Model defined by the DTP Model Base. It
is probably possible to modify this model pre-gen, which would affect
the Entities that are generated. In the case of Entity Generation,
there is no relavent entity model to alter before generation. More
details on what you are trying to do here might help me understand what
you are asking about
Hope this helps,
Neil
Tom Mutdosch wrote:
Hi there,
I've got a fresh batch of Dali questions. :)
1) Is there a way when generating entities to tell Dali that I want my
entity classes added into the class list in the persistence.xml? For
performance reasons, I want to have all of my classes listed there;
also for Java SE scenarios this is a necessary requirement.
2) I know previously Neil mentioned that in an upcoming release that
Dali would allow you to have your connection information placed into
the persistence.xml for you. Will there be some way to decide between
a datasource or a driver-managed connection? That is, if I have a
datasource set up, I would just want the jta-data-source written to
the persistence.xml; otherwise I would need all of the individual
provider properties written out detailing my connection info. Will
these scenarios be handled?
3) I'm interested in extending Dali entity generation to handle things
like generating additional constructors in the entities, or to
generate some default namedQueries. I believe that I can hook into
the Entity Generation framework somehow and perhaps provide my own
subclassed Entity Generator. Is this currently possible? It would be
nice to be able to specify my EntityGenerator in a plugin and then
perhaps be able to choose that from a list of generator providers (or
set it up programatically beforehand) and have the entity generation
wizard call by EntityGenerator. Is something like this currently
possible?
4) Along these same lines, if I want to update the model before
generation to add things like setting up an OCC column or additional
relationships, can I do so? That is, is this entity model exposed so
I can update it so that it will generate what I want?
If anyone can help answer these, or let me know if they should be
opened as feature requests, I'd appreciate it.
Thanks
Tom
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev