[Hibernate-JIRA] Commented: (HV-19) Consider higher level validations, such as email, URL, credit card, etc.
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-19?page=com.... ]
Max Rydahl Andersen commented on HV-19:
---------------------------------------
mailto:plentz@somewhere.xxx is a valid url.
> Consider higher level validations, such as email, URL, credit card, etc.
> ------------------------------------------------------------------------
>
> Key: HV-19
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-19
> Project: Hibernate Validator
> Issue Type: New Feature
> Components: validators
> Reporter: Ted Bergeron
> Assignee: Diego Pires Plentz
> Priority: Minor
>
> I was looking at the release notes for commons validator 1.2 http://wiki.apache.org/jakarta-commons/ValidatorVersion120 and wondered if the higher level constructs fit the design goals of hibernate validator.
> They have email, URL, Credit card and ISBN. These could all be handled via @Pattern with regex matching a constant declared somewhere.
> Would it be desirable to have Hibernate supply the values for these constants? Such as:
> @Pattern(type="email") or @Pattern(regex=org.hibernate.validator.Pattern.EMAIL) or @Email
> Email and URL are global patterns. This probably wouldn't work for something like phone number which is locale sensitive.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 5 months
[Hibernate-JIRA] Created: (HHH-2715) DB2390Dialect does not support unique index generation for primary key
by Eric Georges (JIRA)
DB2390Dialect does not support unique index generation for primary key
----------------------------------------------------------------------
Key: HHH-2715
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2715
Project: Hibernate3
Issue Type: Patch
Components: core
Affects Versions: 3.2.4.sp1
Environment: hibernate 2.1.4 - database: DB2 for 0S390 v7.1 - OS390
Reporter: Eric Georges
supportsUniqueConstraintInCreateAlterTable return true. For IBM DB2 on OS 390 it must return false.
hbm file :
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="events.Event" table="EVENTS">
<id name="id">
<column name="ID" unique-key="ID_IDX" sql-type="int">
</column>
<generator class="increment"></generator>
</id>
<property name="date" type="timestamp" column="DATE"></property>
<property name="title" type="string" column="TITLE">
</property>
</class>
</hibernate-mapping>
Actually it generate this :
create table EVENTS (ID int not null, DATE timestamp, TITLE varchar(255), primary key (ID), unique (ID))
if supportsUniqueConstraintInCreateAlterTable return false it does :
create table EVENTS (ID int not null, DATE timestamp, TITLE varchar(255), primary key (ID))
create unique index ID_IDX on EVENTS (ID)
the right SQL code for DB2 v7 on OS390
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 5 months