vedo il seguente codice nel org.hibernate.id.SequenceGenerator
:
public void configure(Type type, Properties params, Dialect dialect) throws MappingException {
ObjectNameNormalizer normalizer = (ObjectNameNormalizer) params.get(IDENTIFIER_NORMALIZER);
sequenceName = normalizer.normalizeIdentifierQuoting(
PropertiesHelper.getString(SEQUENCE, params, "hibernate_sequence")
);
parameters = params.getProperty(PARAMETERS);
if (sequenceName.indexOf('.') < 0) {
final String schemaName = normalizer.normalizeIdentifierQuoting(params.getProperty(SCHEMA));
final String catalogName = normalizer.normalizeIdentifierQuoting(params.getProperty(CATALOG));
sequenceName = Table.qualify(
dialect.quote(catalogName),
dialect.quote(schemaName),
dialect.quote(sequenceName)
);
}
else {
// if already qualified there is not much we can do in a portable manner so we pass it
// through and assume the user has set up the name correctly.
}
this.identifierType = type;
sql = dialect.getSequenceNextValString(sequenceName);
}
Dove il terzo parametro della PropertiesHelper.getString(String, Properties, String)
è il valore della proprietà di default.
Quindi sono tentato di dire che, da qualche parte, si ha un Id
non "correttamente" annotato. Forse dovresti eseguire una piccola sessione di debug.
fonte
2010-06-17 17:50:46
Sei sicuro non si dispone di alcun @ id dell'Ente annotato con @GeneratedValue() senza nessun attributo dichiarato ??? –