-
1. Re: seam generate-entities failure
maxandersen Oct 3, 2007 1:27 PM (in response to jwooten)what is the DDL for that table ?
apparently mysql is not returning a sql type that we have mapped.
to workaround it you can adjust the reveng.xml file to include mappings from the column type to the relevant hibernate type you actually want.
(see tools.hibernate.org for docs about reveng.xml) -
2. Re: seam generate-entities failure
jwooten Oct 4, 2007 5:12 PM (in response to jwooten)This is what I get for the table queue in question.
mysql> describe queue;
+------------+-----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-----------------+------+-----+---------+-------+
| NAME | varchar(32) | NO | PRI | DEFAULT | |
| NEXT_ENTRY | int(7) unsigned | NO | | 0 | |
| ENTRY_INCR | int(7) unsigned | NO | | 10 | |
+------------+-----------------+------+-----+---------+-------+
3 rows in set (0.09 sec) -
3. Re: seam generate-entities failure
jwooten Oct 10, 2007 9:03 AM (in response to jwooten)Why would Seam not provide a mapping for int? It's not an odd or unusual mapping? It's mapping it as a small blob it says.
I read the part about the xml file and changing it, but there wasn't much to go on there.
Is this seam generation portion ready for use or is it a "beta" edition? I really wanted to use it to create some maintenance screens for a lot of tables we use in applications. -
4. Re: seam generate-entities failure
pmuir Oct 10, 2007 9:11 AM (in response to jwooten)seam-gen is a tool for quickly bootstrapping an application - it's not supposed to generate code you put straight into production.
-
5. Re: seam generate-entities failure
franciscoacb Oct 10, 2007 1:55 PM (in response to jwooten)"pete.muir@jboss.org" wrote:
seam-gen is a tool for quickly bootstrapping an application - it's not supposed to generate code you put straight into production.
Why not, Pete?
I mean, I have always thinked that seam-gen generated code was what is suggested by JBoss Seam Team as a "good pratice", a good way to organize code etc.
You guys have a huge experience in developing web applications, infinitely greater than mine, as a newbie. So isn't it correct to assume that the generated code takes advantage of this experience and we can consider that the code is already (or at least almost) production-quality?
Cheers,
Francisco Antônio
"The biggest weapon against stress is our ability to choose a thought instead of another one." (WILLIAM JAMES)" -
6. Re: seam generate-entities failure
jwooten Oct 10, 2007 2:42 PM (in response to jwooten)I didn't expect it to create my application, but to give me the starting point for a series of maintenance screens for a lot of tables we use in the applicaiton.
-
7. Re: seam generate-entities failure
pmuir Oct 10, 2007 7:29 PM (in response to jwooten)"franciscoacb" wrote:
Why not, Pete?
I would never ever put generated code into production without a complete review first. This just seems like common sense to me.I mean, I have always thinked that seam-gen generated code was what is suggested by JBoss Seam Team as a "good pratice", a good way to organize code etc.
Sure, but its also auto generated - so the templates are best on our recommendations - but not the resulting app.You guys have a huge experience in developing web applications, infinitely greater than mine, as a newbie. So isn't it correct to assume that the generated code takes advantage of this experience and we can consider that the code is already (or at least almost) production-quality?
I would call it always a good starting point for your app - something that you can review, add to and play around with. -
8. Re: seam generate-entities failure
pmuir Oct 10, 2007 7:31 PM (in response to jwooten)As Max says - mysql is probably returning some odd information about the column. I don't think int(7) is the default size for an int?
-
9. Re: seam generate-entities failure
jwooten Oct 11, 2007 8:14 AM (in response to jwooten)int(7) is what you get if you do the default int assignment. At least in my case it was.
-
10. Re: seam generate-entities failure
pmuir Oct 11, 2007 8:14 AM (in response to jwooten)Oops, sorry :(
Anyway, you should report this on the hibernatetools forum -
11. Re: seam generate-entities failure
jwooten Oct 11, 2007 8:19 AM (in response to jwooten)The point of my question is not whether it is the appropriate tool to use to generate an application or to just get the initial generated start to that application, but rather that it should at least generate correct code for normal column attributes from mysql! If it only works for one particular demo case, then just state that this is just a tool for doing cute demos, but is not intended to work for anything else but this cute demo we rigged up.
Don't try this for anything else, because it won't work and isn't intended to? -
12. Re: seam generate-entities failure
jwooten Oct 11, 2007 8:22 AM (in response to jwooten)I don't find a hibernate tools forum in the list of forums for this site.
Where is it? -
-
14. Re: seam generate-entities failure
maxandersen Oct 13, 2007 5:31 AM (in response to jwooten)wo37830: this is just because of some weird datatype being returned by mysql driver/db...we just need to find out what type it is and we can add a mapping for it.
But raise it in hibernatetools forum as pete suggests.