Page 1 of 1

About Question com.enthuware.ets.scbcd.v5.2.96 :

Posted: Thu Jun 30, 2011 10:38 am
by ETS User
*Class files, persistence.xml file, and orm.xml
orm.xml will always be examined because any mapping information given in orm.xml overrides the information present in the classes in the form of annotations. Class files are usually examined but are ignored when xml-mapping-metadata-complete subelement is set to true in the xml files.

Hello,

I think that this option is true (not the forth), for example

This is a class

Code: Select all

public class Author extends Identifiable {
	private String name;
	@Column(name="ADDRESS")
	private String address;
	
	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	@Override
	public String toString() {
		return "Author [name=" + name + ", books=" + getBooks() + "]";
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress() {
		return address;
	}
	
}
and this is a part of orm.xml:

Code: Select all

	<entity class="Author">
		<table name="AUTHOR"></table>
	</entity>
In this case persistent provider how to know the Author in orm.xml override the Author.class, it must examine the class file in every case to know that whether orm.xml may or may not override.

Re: About Question com.enthuware.ets.scbcd.v5.2.96 :

Posted: Thu Jun 30, 2011 11:33 am
by admin
Hello,
As noted in the explanation Class files are ignored when xml-mapping-metadata-complete subelement is set to true in the xml files. Therefore, option 3 is not correct.
In this question, contents of persistence.xml file, and orm.xml are not specified so you cannot say that classes will be examined.

HTH,
Paul.

Re: About Question com.enthuware.ets.scbcd.v5.2.96 :

Posted: Thu Jun 30, 2011 8:52 pm
by Guest
Thanks, that makes sense to me!

Re: About Question com.enthuware.ets.scbcd.v5.2.96 :

Posted: Fri Sep 16, 2011 10:22 pm
by neo
Since xml-mapping-metadata-complete subelement is not mentioned in question. The correct answer would be 4.

This questions is subjective.

Best regards

Re: About Question com.enthuware.ets.scbcd.v5.2.96 :

Posted: Fri Sep 16, 2011 10:43 pm
by neo
Rectifying,

The correct would be option 3.

Re: About Question com.enthuware.ets.scbcd.v5.2.96 :

Posted: Tue Sep 20, 2011 8:36 pm
by Guest
Anyone has advice?

Re: About Question com.enthuware.ets.scbcd.v5.2.96 :

Posted: Wed Sep 21, 2011 6:22 am
by admin
Hello,
As I already mentioned in my previous reply, "In this question, contents of persistence.xml file, and orm.xml are not specified so you cannot say that classes will be examined."

So you cannot assume that xml-mapping-metadata-complete present or absent.

HTH,
Paul.