Hi Greg,

This will be handled more correctly in the next milestone release when
the validation has been put in place (currently still under
construction). The cartridge will then give you a more expressive
message instead of an exception.

Anyway, in Hibernate the id (or composite-id) element is mandatory so
one way or the other you will always need to specify what primary key to
use

Here a fragment from the hibernate mapping dtd:
(http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd)


<!ELEMENT class ( 
  meta*,
  (cache|jcs-cache)?,
  (id|composite-id),
  discriminator?,
  (version|timestamp)?,
 
(property|many-to-one|one-to-one|component|dynamic-component|any|map|set
|list|bag|idbag|array|primitive-array)*, 
  ((subclass*)|(joined-subclass*))
)>


hth

-- Wouter

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:andromda-user-
> [EMAIL PROTECTED] On Behalf Of Greg Johnson
> Sent: Sunday, May 30, 2004 2:58 PM
> To: [EMAIL PROTECTED]
> Subject: [Andromda-user] 3.0m2 hibernate cartridge fails if <<entity>>
> does not declare a <<primary key>>
> 
> 3.0m2 hibernate cartridge fails if an
> <<entity>> does not declare a <<primary key>>.
> 
> to reproduce:
> * create a new project with andromda:genapp and hibernate persistence.
> * add a model with a class with <<entity>> and no <<primary key>>
> * build
> 
> add a <<primary key>> , now ok.
> 
> 
> regards,
> greg johnson
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Andromda-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/andromda-user



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to