What database are you using? MySQL? H2? Other Please try again with 1.1-SNAPSHOT or wait until tomorrow (Nov 4th) when 1.1-M7 is released.
David fixed some things in Mapper just yesterday (issue # 151) related to uppercase dbTableName and dbColumnName to remedy a similar Mapper problem we were seeing with MySQL & H2 databases, and I believe these fixes are included in 1.1-M7 release. I know for sure it is working in 1.1-SNAPSHOT as we put the new Mapper fixes through their paces today with great success. Thanks, Troy On Tue, Nov 3, 2009 at 8:34 AM, Jim McBeath <[email protected]> wrote: > > I have not added anything that seems unusual to me. My code looks > just like what I have listed below except for the table and column > names. I am putting "Foo.menus" into another menu in the SiteMap, > that part seems to be working properly. I have some other tables > that reference this one as a foreign key, but I don't expect that > should have any affect on viewing this table. > > class Foo extends KeyedMapper[String,Foo] { > def getSingleton = Foo > def primaryKeyField = foo_key > > object foo_key extends MappedStringIndex(this,1) { > override def dbColumnName = "FOO_KK" > override def dbDisplay_? = true > } > object name extends MappedString(this,50) { > override def dbColumnName = "FOO_NM" > } > } > > object Foo extends Foo > with KeyedMetaMapper[String,Foo] > with CRUDify[String,Foo] { > > def byKey(key:String) = Foo.findAll(By(Foo.foo_key, key)) > > override def dbTableName = "FOO_T" > override def createMenuName = "Create Foo" > override def editMenuName = "Edit Foo" > override def showAllMenuName = "List Foos" > override def viewMenuName = "View Foo" > } > > -- > Jim > > On Mon, Nov 02, 2009 at 05:21:32PM -0800, Naftoli Gugenheim wrote: > > Date: Mon, 2 Nov 2009 17:21:32 -0800 (PST) > > From: Naftoli Gugenheim <[email protected]> > > To: [email protected] > > Subject: [Lift] Re: CRUDify view pages not working correctly > > > > > > This is pure out-of-the-box CRUDify? No custom binding/querying? > > > > ------------------------------------- > > Jim McBeath<[email protected]> wrote: > > > > > > I have recently started using Lift (1.1-M6) to create a simple data > > editing application. I have a small table with a char(1) key column > > (on which I set dbDisplay_? to true) and a name column for which I > > created mapper code following the sample in the Exploring Lift book. > > When my app displays the View page, the key column shows a value but > > the name column is blank for all records. The key field values are > > not in sorted order, and when I click on a View link it displays a > > page with a key value that is different from the key in the link. Each > > time I click the link I get a different result. Some of the links > > refer to keys that don't exist, and when I click on one of those I get > > a message that the page is not in the SiteMap and is thus blocked. > > Some links appear multiple times on different rows. > > > > I am trying to figure out how I go about debugging this behavior. I > > have called DB.addLogFunc so that I can see what SQL has been > > executed. The query for the list of records includes an ORDER BY > > clause and what I can see looks good. When I execute that query in my > > DB browser I get the expected results, properly sorted. Are there any > > other debugging hooks I can set? Is there a simple way I can get it > > to print out the values it is pulling from the database? Any other > > suggestions? > > > > -- > > Jim > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
