Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: [dali-dev] Default entity's data access

We currently ask for but do not require an access type when the user creates an orm.xml file via the New Mapping File wizard.  We also have a Generic platform default of FIELD in the Java case when nothing has yet been specified. We do this so that something appears in our structure view, otherwise the user would not see any mappings in the structure view and would be forced to enter an annotation via the source.

Does anyone know if the following defines a default access of FIELD for the Foo entity in the generic platform case? No annotations exist on the Java class.

    <entity class="model.Foo">
        <attributes>
            <id name="id" access="FIELD">
            </id>
        </attributes>
    </entity>

Karen

On 6/25/2010 9:41 AM, Goerler, Adrian wrote:

Hi,

 

I think Dali should not implicitly assume a default access type in this case. The generic platform should behave neutrally. I think it could indicate an undeterminable access type as an error and could for example offer quick fixes to add either access type explicitly to the XML. Alternatively, it could ask for the desired access type upon creation of an orm.xml.

 

-Adrian

 

 

 

Adrian Görler
SAP AG

Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx

 

Von: dali-dev-bounces@xxxxxxxxxxx [mailto:dali-dev-bounces@xxxxxxxxxxx] Im Auftrag von Dmitry Geraskov
Gesendet
: Freitag, 25. Juni 2010 15:30
An: Karen Butzke
Cc: General Dali EJB ORM developer discussion.
Betreff: Re: [dali-dev] Default entity's data access

 

Thank you Karen for supporting my minds.
I am not sure that bug 317848 is required, because Hibernate also has default access type (property).
I set default access type for hibernate platform to "property".

Dmitry Geraskov.

24/06/2010 18:45, Karen Butzke wrote:

Dmitry,

>From the spec section 2.3.1:
    It is an error if a default access type cannot be determined and an access type is not explicitly specified
    by means of annotations or the XML descriptor.

We chose to have a default access where there are no annotations in java and an access type is not set in the XML so that the user would be able to see and map attributes in the JPA Structure view. EclipseLink as the reference implementation uses FIELD as the default so we picked FIELD. I think we should have an error or a warning in this case on the Generic platform since the spec says it is an error.. The EclipseLink platform would not have an error. The Hibernate platform could make the default PROPERTY and not have an error. I have entered bug 317848

Thanks,
Karen


On 6/24/2010 5:14 AM, Dmitry Geraskov wrote:

Hi, guys,

I noticed that default data access for entity's data is "field" when I make orm.xml mapping.
At least JPA Details view says me this(see attachment). Is it mentioned somewhere in jpa specification or somewhere else?
I ask because Hibernate implementation uses "property" as default entity's data access.

Thanks,
Dmitry Geraskov.


 
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
  
 
 
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
  

Back to the top