-
1. Re: Is this a known Seam bug? varchar(n) foreign key to char
norman.richards Mar 31, 2007 9:24 PM (in response to mgrouch)This is a hibernate tools issue. The schema validator is very weak when it comes to determining which types are the same for each database. You can turn off validation to get around the issue. You might also want to open up a JIRA case for hibernate tools in the hopes that they can fix the problem.
-
2. Re: Is this a known Seam bug? varchar(n) foreign key to char
norman.richards Mar 31, 2007 9:24 PM (in response to mgrouch)This is a hibernate tools issue. The schema validator is very weak when it comes to determining which types are the same for each database. You can turn off validation to get around the issue. You might also want to open up a JIRA case for hibernate tools in the hopes that they can fix the problem.
-
3. Re: Is this a known Seam bug? varchar(n) foreign key to char
maxandersen Apr 1, 2007 2:57 AM (in response to mgrouch)FYI the schemavalidator is located in hibernate core.
But yes, it's the schemavaliditor that does not understand the concept of compatible types ;) -
4. Re: Is this a known Seam bug? varchar(n) foreign key to char
norman.richards Apr 1, 2007 3:10 PM (in response to mgrouch)Sorry about that. Do you know if anyone is working on the issue in general? It seems to be a problem for a very large number of Seam users.
-
5. Re: Is this a known Seam bug? varchar(n) foreign key to char
maxandersen Apr 1, 2007 3:39 PM (in response to mgrouch)I've done some work on it with respect to hbmlint; but that is not part of hibernate core.
It could also be fixed in hibernate core but would require someone to implement a type compabiilty test function - or simply skip parts of the type/length/precision/scale check(s) -
6. Re: Is this a known Seam bug? varchar(n) foreign key to char
mgrouch Apr 1, 2007 7:05 PM (in response to mgrouch)I've opened JIRA for hibernate. This would be a big issue for use of seam with many real-world databases. Ex in sybase
varchar(n) vs char(n)
integer numeric decimal money,
etc -
7. Re: Is this a known Seam bug? varchar(n) foreign key to char
maxandersen Apr 2, 2007 3:57 AM (in response to mgrouch)You guys do know that this has *zero* functional impact on your app - just disable schema validation if you bump into problems.
[rant on]
And yes it should be fixed, but i'm just "tired" of hearing people say "seam/hibernate does not work because schema validation fails" and that "my project cannot go on before this bug is fixed"...
[rant off] -
8. Re: Is this a known Seam bug? varchar(n) foreign key to char
irvega Apr 2, 2007 9:53 AM (in response to mgrouch)How did you "disable schema validation" in seam?
Is this a documented feature? Presumably this "instruction" to relax schema-validation will filter down to the orm (hibernate) layer. -
9. Re: Is this a known Seam bug? varchar(n) foreign key to char
mgrouch Apr 2, 2007 11:10 AM (in response to mgrouch)in persistence.xml
<property name="hibernate.hbm2ddl.auto" value="false"/>
-
10. Re: Is this a known Seam bug? varchar(n) foreign key to char
irvega Apr 2, 2007 1:07 PM (in response to mgrouch)Does tha mean you'd use
hibernate.hbm2ddl.auto="create"
the first time round (if you wanted your schema generated for you based on annotations on your entity beans) and then set
hibernate.hbm2ddl.auto="false" ? -
11. Re: Is this a known Seam bug? varchar(n) foreign key to char
mgrouch Apr 2, 2007 1:17 PM (in response to mgrouch)In my case DB is already created and has data before I start hibernate session. I think this would be most common case.