Reputation: 117
Is there any documentation available to get the list of available SQL datatypes used in the service.xml?
What value should I use to make the configuration compatible with the following table structure:
CREATE TABLE SAMPLE_TABLE (
NAME varchar(100) NOT NULL,
DESCRIPTION varchar(300) DEFAULT NULL,
CREATE_DATE timestamp
)
Upvotes: 1
Views: 1906
Reputation: 48067
It always feels funny to link to the service-builder DTD (here the HTML version - just see the declaration at the top of your service.xml for the actual file), but you can actually learn a lot from it: It contains way more documentation than actual DTD code, so it's human readable for anybody dealing with service builder. In the DTD you'll find the attributes to declare that you want to connect to an existing table instead of creating one through servicebuilder default mechanisms.
There's another file, which AFAIK sadly does not have a DTD: model-hints.xml. However, luckily there's a developer guide chapter on it: This contains quite some extra information, like: max-length of VARCHAR fields etc. . Use this file for more validation or to specify more details for the columns that get autogenerated into your entity tables.
Upvotes: 2