-
1. Re: How to configure eclipselink so that Teiid can provide sequence for auto generated id?
shawkins Dec 7, 2012 10:15 AM (in response to kchen007)Teiid does not yet provide a mechanism to return a generated key, see https://issues.jboss.org/browse/TEIID-1557
Steve
-
2. Re: How to configure eclipselink so that Teiid can provide sequence for auto generated id?
kchen007 Dec 7, 2012 10:20 AM (in response to shawkins)Steve:
Do you have some suggestion on how to work around the issue for now?
Thanks.
Kevin
-
3. Re: How to configure eclipselink so that Teiid can provide sequence for auto generated id?
shawkins Dec 7, 2012 11:06 AM (in response to kchen007)A workaround would be slightly involved. At the translator level you would need to capture the generated id(s) and then store them on something with a session scope - there would be a couple of hacks to use the CommandContext. Then add a UDF to retrieve the generated id that was last created.
I'll look at addressing this within Teiid proper for 8.3 as this has come up several times.
Steve
-
4. Re: How to configure eclipselink so that Teiid can provide sequence for auto generated id?
kchen007 Dec 7, 2012 7:40 PM (in response to shawkins)Steven:
As always, thanks for the information.
Kevin
-
5. Re: How to configure eclipselink so that Teiid can provide sequence for auto generated id?
shawkins Dec 11, 2012 9:05 AM (in response to kchen007)Basic support for generated keys will be in 8.3 - see https://issues.jboss.org/browse/TEIID-2169
The first alpha should be available later today.
Steve
-
6. Re: How to configure eclipselink so that Teiid can provide sequence for auto generated id?
kchen007 Feb 28, 2013 10:34 AM (in response to shawkins)Steve:
I want to pick up this with beta 3, is there any documentation on how to use it?
Thanks
Kevin
-
7. Re: How to configure eclipselink so that Teiid can provide sequence for auto generated id?
shawkins Feb 28, 2013 10:40 AM (in response to kchen007)Documentation on what aspect? Returning generated keys from the Teiid client is no different than any other JDBC implementation, use a create/prepareStatement that specifies the Statement.RETURN_GENERATED_KEYS option, then call Statement.getGeneratedKeys() after the statement has executed. Are you looking more for something built-in like: https://issues.jboss.org/browse/TEIID-1910
Steve