[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [dali-dev] Dali comments regarding generated artifacts/wizards
|
Tom,
I think we can be somewhat accommodating regarding multiple persistence
units for 1.0. Our plan as of now is to give the user only one warning
when multiple persistence units are detected. At that point, we won't
provide validation or defaulting support, so the user can continue to
manually edit their Entities without problems being reported
everywhere. The complexity we are trying to avoid for 1.0 involves the
cases where there is overlap between the persistence units, such as
having an Entity that is a part of more than one persistence unit.
Since we can't ignore this possibility, due to the erratic behavior that
would result, we would have to be able to detect where this overlap
occurs. As you mention, we are only avoiding this complexity due to
time constraints. We will certainly consider multiple PU support for
post 1.0 releases.
The Platform concept is still mostly concept and not very well
documented yet. But yes, it involves selecting a provider from a list
during project creation, and will provide a way to set provider specific
properties. Your example is exactly the kind of thing that a provider
would choose to do as a part of the persistence.xml creation. Our
thought is that the connection details would be auto-populated into the
persistence.xml in accordance with the provider's custom properties.
Let us know if you have any other thoughts,
Neil
Tom Mutdosch wrote:
Hi Neil,
Thanks for the response. I'll open up some relevant feature requests
as you mentioned. A couple follow-ups:
2) Regarding multiple Persistence Units, though not supported in the
Dali tooling for 1.0, could Dali be made to be more tolerant of this
scenario? Entity generation could always use whichever
connection/schema is set on the project as it is now, and perhaps
validation could not report errors based on schemas if there are
multiple persistence units defined in the project and no explicit
schema annotation on the entity. I know you can disable the entire
JPA validator, but that would be less than ideal as you'd lose the
benefits of validation altogether. It seems like using entities from
multiple schemas and connections inside the same project could be a
common user scenario. So while the tooling wouldn't have to assist in
this, it would be nice to allow them to manually set this up and not
see validation errors as if they have done something that is not
allowed by the JPA spec.
That said, though multiple PUs are not likely for Dali 1.0 release, it
sounds like this is due mainly to implementation complexity and time
constraints. So multiple PUs would still be considered for a future
release; is this correct?
4) You mentioned there is a "Platform" concept in 1.0. Is there any
where I can find more information about this? Mainly I'm interested
if this concept would aid in:
a) selecting an appropriate provider from a list of common providers.
b) have a way to set provider-specific properties. For example, if I
select the toplink provider and I want to use a driver-managed
connection, the appropriate provider-based properties would need to be
generated into the persistence.xml, such as:
<property name="toplink.jdbc.driver" value="com.ibm.db2.jcc.DB2Driver"/>
Thanks,
Tom
Neil Hauge wrote:
Thanks for your feedback Tom. Here are some responses for you:
Project/Persistence Unit creation
1) The request for a schema to be written out to the orm.xml as the
default for the persistent unit sounds like a good idea. Please enter
an enhancement request for this feature in bugzilla if you could. -
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Dali%20JPA%20Tools
2) Unfortunately Dali 1.0 will likely not explicitly support multiple
persistence units per project. There is a lot of complexity that is
introduced with multiple persistence units in a single project having
to do with validation and defaulting, among other things. As of now,
our 1.0 version will support one persistence.xml per project and one
persistence unit per persistence.xml.
3) This functionality is in the plan for 1.0.
4) Dali 1.0 will have a "Platform" concept that will deal with this
and many other issues regarding vendor specific functionality
Generate Entities
1) This is in the plan for Dali 1.0 as well, but you may want to add
an enhancement request to express adopter interest in this. Without
support for multiple persistence units, this may not make as much
sense, but still may be a reasonable thing to do.
Entity Generation Customization
For these items, I think there are a couple of different ways they
could be handled. Ideally, enhancement requests would be filed for
these items and the Dali team would evaluate whether or not a given
request is suitable for the base code, or whether this is something
better left to an extender's code base. If it is a good fit for Dali,
a code patch for the functionality would be submitted to the ER and
then evaluated for inclusion in the base.
Hope this helps,
Neil
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev