This is definitely a hack (not a pattern), but if it works for you, use 
it.  Support for auto number keys is on the todo list.

-dain

Justin Casp wrote:
> hey List
> I posted this problem/workaround to the jboss-user list but never got a 
> response.  Maybe it got lost in the shuffle or maybe it's just a stupid idea.  
> Please tell me what you think either way.
> 
> My problem is dealing with PK fields that are set to auto-increment in the 
> database (e.g., sequence on Postgres or indentity on MS Sql).  My current 
> workaround is to use a simple BMP entity that only has an ejbCreate() method 
> so I can specify my own SQL statement with the PK column left out.
> 
> a solution might be:
> 
>>however, I think that the ability to specify a primary key field as
>>'datasource-provided' in the jbosscmp-jdbc dd would be a useful feature in
>>JBoss.  Is this logically sound or am I missing something here?  JBoss
>>would only have to check for the presence of this tag and, if present, not
>>include this column in the generated SQL insert statement.
> 
> 
> thanks for your input.
> Justin
> 
> 
> 
> 
> -------------------------------------------------------
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development


-- 
xxxxxxxxxxxxxxxxxxxxxxxx
Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to